[Insight-users] Linking errors with ITK+WTL - help please

Luis Ibanez luis.ibanez at kitware.com
Sun Mar 26 11:17:03 EST 2006


Hi Frank,

You seem to be making the common mistake of mixing compilation modes.

You probably built ITK for "Debug" and your application for "Release" ,
or the other way around.

Please make sure that you use the *EXACT* same compilation mode for
all the components of you application. That will include ITK, VTK,
and any other library that you may be combining.

If you were using CMake in order to configure your project, you
will not be having any of these problems.


    Regards,


       Luis


----------------------
Frank Gao wrote:
> Hi All,
> 
> I am trying to use WTL to develop ITK/VTK a sample application. There seems
> to be no problem to get VTK work, but some issues with ITK.
> 
> The application is to open and show a DICOM file.
> 
> Hundreds of linking errors like this one:
> msvcprtd.lib(MSVCP71D.dll) : error LNK2005: "public: class
> std::basic_ostream<char,struct std::char_traits<char> > & __thiscall
> std::basic_ostream<char,struct std::char_traits<char> >::operator<<(class
> std::basic_ostream<char,struct std::char_traits<char> > & (__cdecl*)(class
> std::basic_ostream<char,struct std::char_traits<char> > &))"
> (??6?$basic_ostream at DU?$char_traits at D@std@@@std@@QAEAAV01 at P6AAAV01@AAV01@@Z@
> Z) already defined in MainFrm.obj
> 
> I came across some page in ITK site, which said that including aIl ITK files
> before any other ones may help. I tried this, but then the code won't
> compile.
> 
> If I use 'ignore default library', I get lots of error like this:
> ITKNrrdIO.lib(enum.obj) : warning LNK4049: locally defined symbol _calloc
> imported
> 
> Would anybody please point out a solution to this? Does WTL or ITK have a
> version of stream libs?
> 
> Thanks,
> 
> Frank
> 
> 
> 
> 
> _______________________________________________
> 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