visual c++ - Some weird C compile error in Windows 7 -


when compiled following method geohash_move_x vs 2013(windows version redis), give me many error such below, issue happened @ win7, in win10 there no error.

error 188 error c2275: “uint64_t”: expression illegal

error 189 error c2146: grammar error: lack“;”

error 190 error c2065: “x”: un declared identitier

static void geohash_move_x(geohashbits *hash, int8_t d) { if (d == 0)     return;  uint64_t x = hash->bits & 0xaaaaaaaaaaaaaaaaull; uint64_t y = hash->bits & 0x5555555555555555ull;  uint64_t zz = 0x5555555555555555ull >> (64 - hash->step * 2);  if (d > 0) {     x = x + (zz + 1); } else {     x = x | zz;     x = x - (zz + 1); }  x &= (0xaaaaaaaaaaaaaaaaull >> (64 - hash->step * 2)); hash->bits = (x | y); 

}

enter image description here

i suggest investigate output of pre-processor geohash.c file , compare vs 2013 , vs2015 ( or vs2013 on win 7 , vs2013 win 10). give answer why compiler has problem uint64_t type.

to configure vs output preprocessed file go geohash -> geohash.c file , open it's property page. modify generate preprocessed file property yes. in product, debug solution configuration builds release configuration, careful change options in proper project configuration. or of them.

if configured find pre-processed file in:

msvs\geohash\win32\release\geohash.i 

during problem investigation may need compile geohash.i. open developer command prompt vs, cd msvs\geohash\win32\release directory , run compiler:

cl /tp geohash.i 

Comments

Popular posts from this blog

javascript - Thinglink image not visible until browser resize -

firebird - Error "invalid transaction handle (expecting explicit transaction start)" executing script from Delphi -

mongodb - How to keep track of users making Stripe Payments -