Linker error:1112 module machine type 'X86' conflicts with target machine type 'IA64'
Iam getting the following linker error while building an atl com dll which is targeted to IA64 using a makefile on an XP platform..
1>atls.lib(atlcommodule.obj) : fatal error LNK1112: module machine type 'X86' conflicts with target machine type 'IA64'
1>NMAKE : fatal error U10开发者_如何学C77: '"E:\Program Files\Microsoft Visual Studio 9.0\VC\Bin\x86_IA64\link.exe"' : return code '0x458'
Can anyone tell where I made a mistake?
Hard to say where in this particular case the error is coming from, but usually it means that you are trying to link to libs compiled for a different target architecture than your code is.
You say you want to generate IA64 code, but something is compiled for x86 (probably the libs)
The very first line talks about atlcommodule.obj from atls.lib. How was that compiled? Is it perhaps included from an x86 directory?
That is link target platform mismatch. Not the compiler problem.
Check you project file for the following code. If you find it, remove it.
<Link>
...
<TargetMachine>MachineX86</TargetMachine>
</Link>
精彩评论