Win32到Win64移植编译问题

问题描述 投票:1回答:1

我正在将项目从Win32移植到Win64。我们正在使用make文件,但出现以下错误

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"

我们正在与以下CFLAGS配合使用:

1> cl.exe / nologo / MTd / GR / W3 / Zi / EHsc / Od / I“ .... \ include” / I“ C:\ Program Files(x86)\ Microsoft Visual Studio 9.0 \ VC \包括“ / 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”

我不知道我缺少哪些设置。

c visual-studio 32bit-64bit porting win64
1个回答
3
投票

标头winnt.h希望在尝试以64位模式编译代码时,应定义_AMD64__IA64_

如果使用正确的编译器,它们可能会由编译器自动设置。检查您是否正在使用cl.exe的64位版本。

© www.soinside.com 2019 - 2024. All rights reserved.