ITK/MS Free Tool

From KitwarePublic
< ITK
Revision as of 21:03, 6 September 2004 by Jjomier (talk | contribs)
Jump to navigationJump to search

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:

http://msdn.microsoft.com/visualc/vctoolkit2003/

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:

http://www.microsoft.com/msdownload/platformsdk/sdkupdate/

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

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

Links

http://www.wxwindows.org/lnk_msw.htm

http://www.winprog.org/tutorial/msvc.html