[vtkusers] Compiling VTK in Windows

John Drescher drescherjm at gmail.com
Wed Feb 17 22:00:48 EST 2010


On Wed, Feb 17, 2010 at 9:52 PM, David Doria <daviddoria+vtk at gmail.com> wrote:
>> 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
>
> I ran vsvars32.bat, then
> cmake srcdir -G "NMake Makefiles"
>
> The new error includes:
> CMake Error: your C compiler: "cl" was not found.   Please set CMAKE_C_COMPILER
> to a valid compiler path or name.
>
> I searched for cl.exe and it was not found. Some googling looks like
> it is supposed to come with the .NET frame work - but I have 3.5
> installed but it is still missing...
>
cl.exe is part of the compiler. It comes with every Microsoft Compiler
I have used over the last 15 years. Are you using a free or express
version of Visual Studio?

John



More information about the vtkusers mailing list