1

I'm compiling a visual c++ project, but get errors:

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

I've checked all items in this thread: https://stackoverflow.com/a/4364020/974101

  1. Target machine in Project Property -> Configuration Properties -> Linker -> Advanced is MachineX64 (/MACHINE:X64)

  2. Platform in Solution Property -> Configuration Manager is x64.

  3. But BasicFeatures.obj's target machine is x86 using "dumpbin /headers BasicFeatures.obj | more":

    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. Executable Directories/Library Directories in VC++ Directories is

    "$(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;"
    

The problem is why the target machine of BasicFeatures.obj is x86 when my project targets x64? And how to change it to x64?

Thanks.

Community
  • 1
  • 1
stackunderflow
  • 877
  • 4
  • 13
  • 28
  • 1
    It sounds like you need to either **(a)** rebuild the code that creates BasicFeatures.obj or **(b)** ask for an 64bit build of it if it comes from an external source or **(c)** change your project to a 32bit one. – enhzflep Jan 20 '14 at 05:39

0 Answers0