Click here to Skip to main content
15,885,032 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
hello , i had a project from VS2010 and i want to compile it in VC6 for supporting winXP, i had used DSound in my project , when i include dsound.h it was something wrong , the error is :
C++
d:\program files\microsoft visual studio 10.0\vc\include\vadefs.h(48) : error C2144: syntax error : missing ';' before type 'unsigned int'


file "vadefs.h" is provide by vs2010 , the error line is 5th
C++
1    #ifndef _UINTPTR_T_DEFINED
2    #ifdef  _WIN64
3    typedef unsigned __int64    uintptr_t;
4    #else
5    typedef _W64 unsigned int   uintptr_t;
6    #endif
7    #define _UINTPTR_T_DEFINED
8    #endif


but i can find defination of _W64 in the head of this file , im confused , is that VC6 not support DirectX9 ?

How to fix this?
thanks for your time : )
Posted

1 solution

_W64 is not a definition. It is a compiler keyword. As far as I know, it has been introduced with Visual Studio .Net 2003 / VC7.

Update: You may use an empty definition (#define _W64 or add it to the project compiler options) to avoid the error with VC6.

Joe
 
Share this answer
 
v2
Comments
tonyjiang88215 21-Dec-11 22:19pm    
thanks , but im new at VS, i don`t know "use an empty definition (#define _W64 or add it to the project compiler options)" i had tried use VS2008 , the project was compiled success , but can not be used either Win7 or WinXP , i wonder if VS2010 can make it support Win7 and WinXP
Jochen Arndt 22-Dec-11 5:47am    
If possible, you should use a newer version than VC6. VS2008 is fine. There must be other errors when the compiled program does not run with Win 7 and XP. If you still want to use VC6, add a line "#define _W64" to your source files before including any file that contains the keyword. Alternatively you can add "_W64" to the global project definitions (Project Settings - C/C++ - Preprocessor - Definitions).
tonyjiang88215 22-Dec-11 8:32am    
thanks , i knew why DLL can not used both in Win7 and Xp, when i complie the project with Win7, it requires msvcr100.dll , but there`s no msvcr100.dll in XP without installing VS2010, so the DLL file can not be loaded. im not use mfc in my project any more , so this maybe fix that problem : )

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900