[vtkusers] Compiling VTK in Windows
David Gobbi
david.gobbi at gmail.com
Wed Feb 17 21:40:08 EST 2010
On Wed, Feb 17, 2010 at 6:53 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
> I am trying to compile VTK in Windows XP. I have Visual Studio 2008
> installed. When I select that as my build type using cmake and try to
> configure, I get:
>
> CMake Error at D:/Program Files/CMake
> 2.8/share/cmake-2.8/Modules/CMakeTestCCompiler.cmake:50 (MESSAGE):
> The C compiler "cl" is not able to compile a simple test program.
On Windows you need to set your environment variables so that cmake
can find your compiler.
I always do my VTK builds from the console, so I just run the
"vsvars32.bat" file that comes with the compiler to set the variables
before I do a build. In fact I use three different compilers
depending on the project... VS2003, VS2005, and VS2008. If you are
using the free compilers, you will also have to set environment
variables for the Windows SDK if you downloaded it separately.
One great thing about doing the builds from the console is that it
makes it possible to use nmake instead of devenv. With nmake, there
is no long wait at the beginning while the project loads.
David
More information about the vtkusers
mailing list