[Insight-users] How to solve link conflicts
Luis Ibanez
luis.ibanez at kitware.com
Mon Apr 24 16:02:21 EDT 2006
Hi Joshua,
You are mixing compilation modes between ITK and your project.
You are probably building one for Release and the other one for Debug.
Please use the *exact* same compilation mode for the ITK toolkit
and the project that make use of it.
Note that you whould not have to deal with this anoying details
if you were using CMake in order to generate your project.
Regards,
Luis
========================
liujs at csie.nctu.edu.tw wrote:
> Dear All,
>
> I compiled ITK2.6.0 and set the paths of the including files and the libraries in my visual-studio 2005 project.
> Then, I try to compile a simple testing file:
> ---------------------------------------------------------
> #include \"itkImageFileReader.h\"
> #include \"itkImage.h\"
> void main()
> {
> typedef float VxlType;
> const unsigned int Dimension = 3;
> typedef itk::Image<VxlType, Dimension> ImageType;
> typedef itk::ImageFileReader<ImageType> ReaderType;
> ReaderType::Pointer reader = ReaderType::New();
> }
>
> The compiling results a warnning message as:
> LINK : warnning LNK4098: defaultlib \'MSVCRTD\' conflicts with use of other libs; use /NODEFAULTLIB:library
>
> If I ignore this, another unhandled exception occurs.
>
> I search other users who got the same warnning message (LNK4098) like me:
> (1) http://www.stanford.edu/~yljiang/pages/GPRS%20Linking%20Warning.htm
> This link mentioned the problem occurs due to different types or debug and
> non-debug versions of the run-time library are used , and the they suggest
> to add some libraries to the ignore tab of VC setting.
>
> (2) http://www.codecomments.com/archive372-2005-5-426078.html
> This link mentioned the conflicts can be solved by linking the project in the same threading model.
>
> (3) There are some links say the conflict can be solved by simply adding
> MSVCRTD.lib into the ignore term.
>
> I have tried all of these solution, however, no one can let me free!
> Maybe I missed something in the settings...
>
> Does anyone know how to solve this?
> Any help will be great appreciated!
>
> joshua
>
>
>
> _______________________________________________
> Insight-users mailing list
> Insight-users at itk.org
> http://www.itk.org/mailman/listinfo/insight-users
>
>
More information about the Insight-users
mailing list