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
Target machine in Project Property -> Configuration Properties -> Linker -> Advanced is MachineX64 (/MACHINE:X64)
Platform in Solution Property -> Configuration Manager is x64.
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
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.