How to make Visual Studio 2012 call the native 64-bit Visual C++ compiler instead of the 32-bit x64 cross-compiler?

后端 未结 2 1787
别跟我提以往
别跟我提以往 2021-02-09 05:36

Visual Studio 2012 seems to always call the 32-bit version of cl.exe located at %ProgramFiles(x86)%\\Microsoft Visual Studio 11.0\\VC\\bin\\x86_amd64)

2条回答
  •  星月不相逢
    2021-02-09 06:05

    I was converting an old project from Win32 to x64 and came across this problem.
    I found two different ways on how to go around this:

    Method 1:
    i. Got to: Project properties | General | Platform Toolset
    ii. Change the value from 'Visual Studio 2012 (v110)' to 'Visual Studio 2012 - Windows XP (v110_xp)'

    Mehtod 2:
    i. Open configuration file %LOCALAPPDATA%\Microsoft\MSBuild\v4.0\Microsoft.Cpp.x64.user.props
    ii. Inside the property group, I replaced the $(WindowsSDK_ExecutablePath_x64) entry with $(WindowsSDK_ExecutablePath_x86)

    After any of these all worked fine.

提交回复
热议问题