Talk:ITK/MS Free Tool

From KitwarePublic
Jump to navigationJump to search

This wiki page is a bit old. It's 2006-08-04 and I'm using cmake 2.4.3 and compiling itk 2.8.1

Problem is, I'm not even sure all the bits needed to compile itk with the free microsoft compiler are where the page claims them to be (sorry, I haven't hunted for the bits in more than a year, wouldn't know).

If you are using this wiki as a starting point for compiling itk, please consider updating the page with your own findings (or put it in the discussion if you're unsure).

Having said all that, these are the problems I faced when compiling itk:

  • As of cmake 2.4 (and probably the cmake before that) I could not use cmakesetup without setting all the environment variables in setenv.bat and vcvars32.bat
  • lib.exe (which is required by cmake/nmake) is now missing. I found a replacement here: Search for "Eclipse plug-in for Symbian OS C++ development" with google, it's the page pf128.krakow.sdi.tpnet.pl/symbdev/ (sorry wiki thinks the link is spam...)

The lib.exe available on the page is a wrapper around "link /lib". There's also a dumpbin.exe which wraps "link /dump". Copy both exe files in the same directory as your link.exe

As of CMake 2.4.6 'lib.exe' is not required any more. CMake now properly use 'link /lib'.

Environment variables I had to add (in control panel, system, advanced, environment variables, case might matter!):

  • APPVER : 5.0.1
  • Basemake : C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Include\BKOffice.Mak
  • Bkoffice : C:\Program Files\Microsoft Platform SDK for Windows XP SP2
  • CPU : i386
  • INCLUDE : C:\Program Files\Microsoft Visual C++ Toolkit 2003\include;C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Include;C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Include\mfc
  • INETSDK : C:\Program Files\Microsoft Platform SDK for Windows XP SP2
  • LIB : C:\Program Files\Microsoft Visual C++ Toolkit 2003\lib;C:\Program Files\Microsoft Visual Studio .NET 2003\Vc7\lib;C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Lib
  • MSSdk : C:\Program Files\Microsoft Platform SDK for Windows XP SP2
  • Mstools : C:\Program Files\Microsoft Platform SDK for Windows XP SP2
  • TARGETOS : WINNT
  • VCToolkitInstallDir : C:\Program Files\Microsoft Visual C++ Toolkit 2003\

I also added the following to my PATH: C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Bin;C:\Program Files\Microsoft Platform SDK for Windows XP SP2\Bin\win95;C:\Program Files\Microsoft Visual C++ Toolkit 2003\bin;C:\Program Files\Microsoft.NET\SDK\v1.1\Bin

Anybody knows which subset of these variables is actually required? Will changing the CPU variable result in faster code being compiled?

Hope this helps...