Hello,
I am a totally newbie and I would be pleased, if you could help me.
Here is the problem: I have created VS 2008 project and configured it for using the ITK (toolkit for medical image analysis - in my case for reading Dicom images). Everything worked OK until I added ALGLIB to my project (library for algebraic operations - it is one file: libalglib.lib and a few .h files for include). Here comes the problem: when I tried to compile and link my project with this ALGLIB library, I got these errors and I dont know what to do (tried different Runtime library settings etc., nothing helped).
I assume, that it could be some conflict with ITK and ALGLIB - when I comment part of my code using ITK, everythnig works well (ALGLIB works ok) and when I comment part of my code using ALGLIB, everything works as well too (ITK works ok).
Here are the errors:
1>Linking...
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::~basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(void)"
(??1?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::operator=(char const *)"
(??4?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV01@PBD@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)"
(?length@?$char_traits@D@std@@SAIPBD@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: unsigned int __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::size(void)const "
(?size@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEIXZ) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)"
(??0?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@ABV01@@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::erase(unsigned int,unsigned int)"
(?erase@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@II@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::allocator<char>::allocator<char>(void)"
(??0?$allocator@D@std@@QAE@XZ) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::allocator<char>::deallocate(char *,unsigned int)"
(?deallocate@?$allocator@D@std@@QAEXPADI@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::allocator<char>::allocator<char>(class std::allocator<char> const &)"
(??0?$allocator@D@std@@QAE@ABV01@@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char * __thiscall std::allocator<char>::allocate(unsigned int)"
(?allocate@?$allocator@D@std@@QAEPADI@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: unsigned int __thiscall std::allocator<char>::max_size(void)const "
(?max_size@?$allocator@D@std@@QBEIXZ) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(char const *)"
(?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBD@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > & __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::assign(char const *,unsigned int)"
(?assign@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAEAAV12@PBDI@Z) already defined in libalglib.lib(trfac.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "protected: char * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Myptr(void)"
(?_Myptr@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEPADXZ) already defined in libalglib.lib(trfac.obj)
1> Creating library Debug\interpolating-scheme.lib and object Debug\interpolating-scheme.exp
1>Debug\interpolationg-scheme.exe : fatal error LNK1169: one or more multiply defined symbols found
Thanks for any HELP!