I am porting a project from Win32 to Win64. We are using make file but we get the following error
开发者_运维百科1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\codeanalysis\sourceannotations.h(17) : error C2371: 'size_t' : redefinition; different basic types1>
binding.cpp : see declaration of 'size_t'
C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include\winnt.h(81) : fatal error C1189: #error : "No Target Architecture"
We are copmiling with following CFLAGS:
1> cl.exe /nologo /MTd /GR /W3 /Zi /EHsc /Od /I "....\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include" /I"C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\PlatformSDK\include" /I"C:\Program Files\Microsoft SDKs\Windows\v6.0A\Include" /D_X86_ /D_WIN64 /D_WIN32 /D "_DEBUG" /D "_WINDOWS" /D_CRT_SECURE_NO_WARNINGS /Fo".\Debug\" /Fd".\Debug\" /FD /c "test.cpp"
I don't know which settings I am missing.
The header winnt.h expects that either _AMD64_
or _IA64_
should be defined when you're trying to compile the code in 64-bit mode.
They may be set by the compiler automatically if you use the right compiler. Check that you're using the 64-bit version of cl.exe.
精彩评论