简体   繁体   中英

Getting error C2039 on vista32bit while the same code works correctly on XP

I'm using visual studio 2005. I executed my code in XP windows and it worked correctly, but when I want to do the same in vista32 it starts to say these errors which seems strange. I've searched a lot and found this a common problem but I couldn't find any clear and useful solution. If some body helps I would appreciate it very much.

Error 1 error C2039: '_strtoi64' : is not a member of '`global namespace'' c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Error 2 error C3861: '_strtoi64': identifier not found c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Error 3 error C2039: '_strtoi64' : is not a member of '`global namespace'' c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Error 4 error C3861: '_strtoi64': identifier not found c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Error 5 error C2039: '_strtoi64' : is not a member of '`global namespace'' c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Error 6 error C3861: '_strtoi64': identifier not found c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Error 41 error C2039: '_strtoi64' : is not a member of '`global namespace'' c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Error 42 error C3861: '_strtoi64': identifier not found c:\\program files\\microsoft visual studio 8\\vc\\include\\xlocnum 469

Check Include section in Visual Studio dependency and project dependency. Maybe you include some directory with std headers from old SDK. Standard directories should be on the top of the list.

I just uninstall and again reinstall the visual 2005 and surprisingly it worked, tnx for all your advices.

regards

Somebody is referencing the function strtoi64( ), which converts a C-string to a 64-bit integer. But you are running on a 32-bit system so there is no such function. First, I would look into the offending file, which is somewhere in or around

c:\program files\microsoft visual studio 8\vc\include\xlocnum

(whatever that is) at line 469 to see what that guy is trying to do.

It seems likely to me that when VS was installed onto the Vista machine, someone somehow enabled 64-bit compilation, so imo you will probably have to go through the VC configs to make sure they are all 32-bit settings.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM