[vtkusers] error: cmake + free optimizing compiler from .net framework SDK --- x86 conflicts with x64

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Dec 6 13:26:55 EST 2006


Weiguang Guan wrote:
> Hi,
> 
> I wanted to make use of the free C/C++ command line compiler that comes 
> with microsoft's .net framework SDK 2.0 (platform SDK is installed as 
> well). When I was using CMake to configure VTK5.0 on a x86 machine, I 
> chose "NMake Makefile". But the C compiler failed to compile a simple 
> test program, complaining "fatal error LNK1112: module machine type 
> 'X86' conflicts with target machine type 'X64'. I have no idea why it 
> considered my computer to be x64, and it didn't help at all even if I 
> changed /machine:x64 to /machine:/x86 in CMAKE_EXE_LINKER_FLAGS. Anybody 
> had similar experience or had suggestion to this situation? Thanks.

Weiguang,

	Here is the script I am using (bash+cygwin):

export PATH='/cygdrive/c/Program Files/CMake 
2.4/bin/:/cygdrive/c/Program Files/Microsoft Visual C++ Toolkit 
2003/bin:/cygdrive/c/Program Files/Microsoft Platform SDK for Windows 
Server 2003 R2/Bin:/cygdrive/c/Program Files/Microsoft Platform SDK for 
Windows Server 2003 R2/Bin/win64':$PATH
export LIB="C:\Program Files\Microsoft Visual C++ Toolkit 
2003\lib;C:\Program Files\Microsoft Platform SDK for Windows Server 2003 
R2\Lib"
export INCLUDE="C:\Program Files\Microsoft Visual C++ Toolkit 
2003\include;C:\Program Files\Microsoft Platform SDK for Windows Server 
2003 R2\Include"



	Please check that you have something similar. Once this script is 
evaluated (source), run cmake in an empty directory (do not try to rerun 
in a old binary directory).

HTH
Mathieu



More information about the vtkusers mailing list