[CMake] NMake Generation Error: machine type 'X86' conflicts with target machine type 'x64'

Aaron_Wright at selinc.com Aaron_Wright at selinc.com
Thu Nov 12 17:36:44 EST 2009


I'm trying to use nmake to build a simple library, but cmake seems to have 
a problem figuring out if my machine is x86 or x64. For example, I run,

cmake -G "NMake Makefiles" ..

and I get:

CMakeFiles\cmTryCompileExec.dir\testCCompiler.c.obj : fatal error LNK1112:
module machine type 'X86' conflicts with target machine type 'x64'

My CMakeOutput.log files says:

The system is: Windows - 5.1 - x86
Determining if this is a 64 bit system passed:
CreateProcessError: The system cannot find the file specified.


for command: cl /nologo "C:\Program Files\CMake 
2.6\share\cmake-2.6\Modules\CMakeTestForFreeVC.cxx" /link /machine:i386 
in dir: X:/dcs/components/directory/nmake_build/CMakeFiles/CMakeTmp3

Compiling the C compiler identification source file "CMakeCCompilerId.c" 
succeeded.
Compiler: C:/Program Files/Microsoft Visual Studio 9.0/VC/bin/cl.exe 
Build flags: ;/DWIN32;/D_WINDOWS;/W3;/Zm1000
Id flags: 

The output was:
0
Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 15.00.30729.01 for 
80x86
Copyright (C) Microsoft Corporation.  All rights reserved.

Which seems pretty x86 to me. Where is this x64 coming from?

I'm using a Visual Studio 9 2008 Express command prompt.
--------------------------------------------------------
Aaron Wright
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.cmake.org/pipermail/cmake/attachments/20091112/69ddac71/attachment-0001.htm>


More information about the CMake mailing list