[Insight-users] (no subject): Mixing compilation modes in VC++

Luis Ibanez luis . ibanez at kitware . com
Mon, 04 Aug 2003 12:59:50 -0400


Hi Adolfo,

Please do *not* add anything to Project Settings manually.
That defeats the purpouse of CMake.

The real source of the error you get is that you are building
ITK for Debug, and your application for Release.

Please make sure that you use the same compilation mode
for both the library and the application.

The warning:

LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; 
use /NODEFAULTLIB:library

Is a serious one and should not be ignored.

Applications that mix compilation modes (e.g. Debug, Release),
are unstable and produce unpredictable run time errors.


Regards,


    Luis

------------------------
fito at unizar . es wrote:

>Hi Luis!
>
>I'm using ITK 1.2.0 release.
>
>Your files seems to be right. But I've had to 
>set "Project/Settings/Link/Input/Additional Library Path" to 
>C:\itk-bin\bin\Debug
>in order to avoid an error:
>LINK : fatal error LNK1104: cannot open file "ITKCommon.lib"
>
>Now I get only a warning like this
>
>LINK : warning LNK4098: defaultlib "MSVCRTD" conflicts with use of other libs; 
>use /NODEFAULTLIB:library
>
>but I feel I can manage it by myself (I hope so!)
>
>Thanks for the help.
>Adolfo G.U.
>
>
>Mensaje citado por Luis Ibanez <luis . ibanez at kitware . com>:
>
>  
>
>>Hi Adolfo,
>>
>>Thanks for sending your CMakeLists.txt file.
>>
>>What version of ITK are you using  ?
>>
>>The following CMakeLists.txt and .cxx files
>>worked fine for me. (Note the addition of
>>ITKNumerics, although in the latest cvs
>>version this is not necessary, ITKCommon
>>should pull up the dependencies.)
>>
>>Please give it a try to these two files
>>and let us know if you continue experiencing
>>any problems.
>>
>>
>>You may also find useful the Installation
>>section in the SoftwareGuide
>>http://www . itk . org/ItkSoftwareGuide . pdf
>>Section 2.2.1, pdf-page 39
>>
>>Regards,
>>
>>
>>   Luis
>>    
>>
>
>_______________________________________________
>Insight-users mailing list
>Insight-users at itk . org
>http://www . itk . org/mailman/listinfo/insight-users
>
>  
>