Alex Rivera | Logout

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'

Asked 2010-08-25T07:36:09.427
216

I'm using CUDA (VC++, Visual studio 2008sp1) to debug a FEM program. The program can only run on a Win32 platform, for the insufficiency of cuda. I think the library files linked are all compiled on the x86 platform, but when I compile it, I get the error message

fatal error LNK1112: module machine type 'x64' conflicts with target machine type 'X86'.

I have tried to convert the platform to x64, but it didn't work. Please tell me: what is "module machine type" and what is "target machine type"? How can I overcome it?

Edit
Report

1 Answer

188

In addition to C Johnson list I would add the following point:

Check following option for the project in the Visual Studio:
Project Properties -> Configuration Properties -> Linker -> Command line.

"Additional Options" should NOT contain /machine:X86

I have such key, generated by CMake output: CMake generated x86 project, then I added x64 platform via Configuration Manager in Visual Studio 2010 - everything was created fine for the new platform except that the linker command line, specified /machine:X86 separately.

answered 2013-04-08T22:35:17.317

Your Answer