[Insight-users] Link Error! Help.
Martin Urschler
martin at urschler.info
Tue Apr 12 10:05:03 EDT 2005
firebird at medison.com wrote:
> But, The link was successful when I used CMakeSetup.exe.
>
> I wonder how I can compile ITK code successfully without
> CMakeSetup.exe, when I use Visual C++ 6.0
>
> Do I always have to compile with CMakeSetup.exe?
>
> Thank you.
No, of course you don't have to compile with CMakeSetup.exe since what
CMakeSetup does for you is to create a visual c project, which may be
built manually as well.
Nevertheless it makes sense to use CMake since the hassles that you
stumbled across are part of the reasons why CMake was designed...
In your case I would suppose that you are linking against a wrong MSVC C
runtime library. You should check against which runtime your compiled
ITK was linked (I suppose Multithreaded DLL for release or Debug
Multithreaded DLL for debug build) and also choose the same runtime to
link against in your project (Project Settings, C/C++, Code Generation).
Another suggestion would be to create a MSVC project file of your
example with CMakeSetup and note all the settings in your created
project file (like, include dirs, lib dirs, linked libraries, linked
runtime library, settings for rtti and exception handling, ...). Then
use the same settings for your project.
HTH,
Martin Urschler
More information about the Insight-users
mailing list