ITK/MS Free Tool: Difference between revisions

From KitwarePublic
< ITK
Jump to navigationJump to search
Line 24: Line 24:


* Move ''link.exe'' and ''nmake.exe'' from C:\Program Files\Microsoft SDK\Bin\Win64 to C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin
* 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)''
'' (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 more and not Debug mode since Visual C++ Tolkit 2003 is only shipped with libcmt.lib and not libcmtd.lib ''


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

Revision as of 17:44, 1 February 2005

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

(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 more and not Debug mode since Visual C++ Tolkit 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

Links

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

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