项目的目标机器和* .obj是不同的

时间:2014-01-20 03:19:16

标签: c++ visual-studio compilation visual-c++-2012

我正在编译一个visual c ++项目,但是会出错:

"1>     2>objd\amd64\BasicFeatures.obj : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'x64' [D:\xproject\xproject.vcxproj]"

我已检查此帖子中的所有项目:https://stackoverflow.com/a/4364020/974101

  1. 项目属性中的目标机器 - >配置属性 - >链接器 - >高级是MachineX64(/ MACHINE:X64)

  2. 解决方案属性中的平台 - > Configuration Manager是x64。

  3. 但BasicFeatures.obj的目标机器是使用“dumpbin / headers BasicFeatures.obj | more”的x86:

    Dump of file BasicFeatures.obj
    File Type: COFF OBJECT
    FILE HEADER VALUES
                 14C machine (x86)
                1439 number of sections
            52DC8466 time date stamp Mon Jan 20 10:05:26 2014
              230284 file pointer to symbol table
                4F2B number of symbols
                   0 size of optional header
                   0 characteristics
    
  4. VC ++目录中的可执行目录/库目录

    "$(VCInstallDir)bin\x86_amd64;$(VCInstallDir)bin;$(SDK40ToolsPath);$(WindowsSdkDir)bin;$(VSInstallDir)Common7\ide;$(MSBuildToolsPath32);$(FxCopDir);$(PATH);"
    "$(VCInstallDir)lib\amd64;$(VCInstallDir)atlmfc\lib\amd64;$(WindowsSdkDir)lib\x64;"
    
  5. 当我的项目以x64为目标时,问题是为什么BasicFeatures.obj的目标机器是x86?以及如何将其更改为x64?

    感谢。

0 个答案:

没有答案