Skip to content

Commit 9ca3b3d

Browse files
committed
Added comment to compile for MSVC
1 parent a648a18 commit 9ca3b3d

File tree

4 files changed

+27
-6
lines changed

4 files changed

+27
-6
lines changed

README.md

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,10 +55,6 @@ To build the original Mapcode tool, execute:
5555
cd utility
5656
gcc -O mapcode.cpp -o mapcode
5757

58-
(Or if you need to make sure there are no warnings:)
59-
60-
gcc -Wall -Wstrict-prototypes -Wshorten-64-to-32 -O mapcode.cpp -o mapcode
61-
6258
For help, simply execute the binary file 'mapcode' without no arguments.
6359
This tool provides a rather extensive command-line interface to encode and
6460
decode Mapcodes.
@@ -125,6 +121,14 @@ This produces the following help text:
125121
The result code is 0 when no error occurred, 1 if an input error occurred and 2
126122
if an internal error occurred.
127123

124+
If you use **Microsoft Visual C++**, you may need to add the following defines to your preprocessor
125+
settings:
126+
127+
NO_POSIX_THREADS
128+
_CRT_SECURE_NO_WARNINGS
129+
_CRT_NONSTDC_NO_DEPRECATE
130+
131+
128132
# Release Notes
129133

130134
### 2.4.0

unittest/README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,12 @@ To build the unit tests, execute:
1212
To execute the tests, simply execute:
1313

1414
./unittest
15+
16+
If you use **Microsoft Visual C++**, you may need to add the following defines to your preprocessor
17+
settings:
18+
19+
NO_POSIX_THREADS
20+
_CRT_SECURE_NO_WARNINGS
21+
_CRT_NONSTDC_NO_DEPRECATE
22+
23+

unittest/unittest.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ static int testEncodeAndDecode(const char *str, double y, double x, int localsol
580580
int tc2 = -1;
581581
int tcParent = -1;
582582
int j;
583-
char *e = (char *) strchr(strResult, ' ');
583+
char *e = strchr(strResult, ' ');
584584
found = 0;
585585
if (e) {
586586
*e = 0;
@@ -1420,7 +1420,7 @@ static int test_territories_csv(void) {
14201420
if (sep) {
14211421
*sep = 0;
14221422
}
1423-
match = (char *) strstr(territoryNames, s);
1423+
match = strstr(territoryNames, s);
14241424
if (match == NULL ||
14251425
(match[strlen(s)] != ' ' && match[strlen(s)] != 0 && match[strlen(s)] != ',' &&
14261426
match[strlen(s)] != ')')) {

utility/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@ As an example, type:
2020
This tool provides a rather extensive command-line interface to encode and
2121
decode Mapcodes.
2222

23+
If you use **Microsoft Visual C++**, you may need to add the following defines to your preprocessor
24+
settings:
25+
26+
NO_POSIX_THREADS
27+
_CRT_SECURE_NO_WARNINGS
28+
_CRT_NONSTDC_NO_DEPRECATE
29+
30+

0 commit comments

Comments
 (0)