# Difference between revisions of "ITK/MS Free Tool"

< ITK

Microsoft has release a free version of its command-line compiler. Here is a little tutorial on how to get the MS Free Tool working and how to compile ITK with it.

## Getting the tool

First you have to download the MS Free tool from Microsoft website:

However the free MS VC++ toolkit is missing some important tools like "lib.exe", "nmake.exe", "cvtres.exe". To get them you can download the free SDK from microsoft:

You just need the Core SDK. After installing you need to modify the environement variables on your computer:

• Right click on My Computer -> Properties
• Go to the 'Advanced' tab and click on ' Environment Variables'
• Set the variables as follow:
• INCLUDE: C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Files\Microsoft SDK\include;C:\Program Files\Microsoft SDK\include\Win64\mfc
• LIB: C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib;C:\Program Files\Microsoft SDK\Lib
• Move link.exe and nmake.exe from C:\Program Files\Microsoft SDK\Bin\Win64 to C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin

(Another approach is to append (after all other bin path), the path: C:\Program Files\Microsoft SDK\Bin\Win64 since nmake depends on another lib from this directory). Also on a side note you can only compile in Release mode and not Debug mode since Visual C++ Toolkit 2003 is only shipped with libcmt.lib and not libcmtd.lib

You should now be able to compile an application using the free compiler.

## Compiling ITK with CMake 2.0.4

Only the next release of CMake (2.0.4) will support the Free MS compiler. However, you can get the cvs version of CMake and compile it using your favorite windows compiler and run it.

• Select 'NMake Makefiles' under Build for:
• Generate the makefiles (Configure/OK)
• Using the console type nmake at the top of the binary tree