[Insight-developers] ITK with free VC++ compiler

Julien Jomier jjomier at cs.unc.edu
Mon Aug 9 17:06:06 EDT 2004


Hello,

I successfully compiled ITK with the free VC++ compiler. However I had to
manually modify the CMakeCache.txt because all the TRY_COMPILE are failing
the first time I run CMake.

Here's the full story. The free vc compiler doesn't work with the
Multithreaded DLL run-time library because msvcprt.lib (and the debug
version msvcprtd.lib) are not included with the free compiler. On the other
hand, the multithreaded libraries (msvcrt.lib and msvcrtd.lib) are included.
By default CMake sets the CMAKE_CXX_FLAGS (and CMAKE_C_FLAGS) to /MD
(Multithreaded DLL) and therefore all TRY_COMPILE fail because the
msvcprt.lib is not found. Then when changing the CXX_FLAGS to /MT
(Mutithreaded), this doesn't cause CMake to redo the TRY_COMPILE because the
values are cached.

Is there any easy way to fix this?

I'll setup a dashboard for this compiler.

Thanks,

Julien



More information about the Insight-developers mailing list