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

Mathieu Malaterre mathieu.malaterre at kitware.com
Wed Dec 13 12:07:17 EST 2006


Weiguang Guan wrote:
> Hello all,
> 
> With the help from Bill Hoffman, the problem has been solved. I'd like 
> to share the solution with you.
> 
> You may already find articles on the net, talking about free 
> command-line c++ complier from within microsoft's .Net Framework SDK and 
> win32 libs from within Platform SDK. I installed both and successfully 
> compiled all the examples from the "OpenGL RedBook", and mistakenly 
> thought I got the free comipler work.
> 
> Then, error occurred when I tried to build VTK --- CMake failed to 
> compile/link a simple c++ program during configuring VTK because 
> libcpmt.lib could not be found. In fact, all the c++ standard libs are 
> NOT shipped with either Framework SDK or Platform SDK.
> 
> The right way is using Microsoft Visual C++ 2005 Express Edition, which 
> is free of charge. You can download it from 
> http://msdn.microsoft.com/vstudio/express/visualc/. You need to 
> uninstall .NetFramework SDK if you already install it, and make sure you 
> set environmental variables correctly --- path, include, lib ...

Just to avoid any misunderstand Visual Studo C++ 2005 is the right way 
of doing it, simply because Microsoft is recommending it. People should 
still be able to build CMake/VTK/ITK or any other project using the 
VC++Toolkit 2003 + Plateform SDK.

libcpmt.lib is in:
C:/Program Files/Microsoft Visual C++ Toolkit 2003/lib

CMake 2.4.5 now uses the 'link' command, which solve the last remaining 
problem with the free tool:
http://vtk.org/Bug/bug.php?op=show&bugid=3652&pos=0


Mathieu


Ref: Here is what I use:

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"




More information about the vtkusers mailing list