[vtkusers] vtk linking errors

Radu Ilinca radu_away_hu at yahoo.com
Tue Dec 1 04:46:33 EST 2009


Dear All,
 
I am trying a simple raycasting in vtk and I get a lot of linker errors like:
 
1>Linking...
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Lockit::~_Lockit(void)" (??1_Lockit at std@@QAE at XZ) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Lockit::_Lockit(int)" (??0_Lockit at std@@QAE at H@Z) already defined in libcpmtd.lib(xlock.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "void __cdecl std::_Debug_message(wchar_t const *,wchar_t const *,unsigned int)" (?_Debug_message at std@@YAXPB_W0I at Z) already defined in libcpmtd.lib(stdthrow.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (??1_Container_base_secure at std@@QAE at XZ) already defined in MyData.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> >(void)" (??1?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at XZ) already defined in MyData.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> >(char const *)" (??0?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at PBD@Z) already defined in MyData.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 at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE at ABV01@@Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char const * __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::c_str(void)const " (?c_str@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBEPBDXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (??0_Container_base_secure at std@@QAE at XZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::setstate(int,bool)" (?setstate@?$basic_ios at DU?$char_traits at D@std@@@std@@QAEXH_N at Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(int)" (?width at ios_base@std@@QAEHH at Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputn(char const *,int)" (?sputn@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEHPBDH at Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static bool __cdecl std::char_traits<char>::eq_int_type(int const &,int const &)" (?eq_int_type@?$char_traits at D@std@@SA_NABH0 at Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static int __cdecl std::char_traits<char>::eof(void)" (?eof@?$char_traits at D@std@@SAHXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::sputc(char)" (?sputc@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEHD at Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_streambuf<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::rdbuf(void)const " (?rdbuf@?$basic_ios at DU?$char_traits at D@std@@@std@@QBEPAV?$basic_streambuf at DU?$char_traits at D@std@@@2 at XZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: char __thiscall std::basic_ios<char,struct std::char_traits<char> >::fill(void)const " (?fill@?$basic_ios at DU?$char_traits at D@std@@@std@@QBEDXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::flags(void)const " (?flags at ios_base@std@@QBEHXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::width(void)const " (?width at ios_base@std@@QBEHXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: static unsigned int __cdecl std::char_traits<char>::length(char const *)" (?length@?$char_traits at D@std@@SAIPBD at Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > & __thiscall std::basic_ostream<char,struct std::char_traits<char> >::flush(void)" (?flush@?$basic_ostream at DU?$char_traits at D@std@@@std@@QAEAAV12 at XZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::basic_ostream<char,struct std::char_traits<char> > * __thiscall std::basic_ios<char,struct std::char_traits<char> >::tie(void)const " (?tie@?$basic_ios at DU?$char_traits at D@std@@@std@@QBEPAV?$basic_ostream at DU?$char_traits at D@std@@@2 at XZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::good(void)const " (?good at ios_base@std@@QBE_NXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ostream<char,struct std::char_traits<char> >::_Osfx(void)" (?_Osfx@?$basic_ostream at DU?$char_traits at D@std@@@std@@QAEXXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "bool __cdecl std::uncaught_exception(void)" (?uncaught_exception at std@@YA_NXZ) already defined in libcpmtd.lib(uncaught.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Lock(void)" (?_Lock@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEXXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_streambuf<char,struct std::char_traits<char> >::_Unlock(void)" (?_Unlock@?$basic_streambuf at DU?$char_traits at D@std@@@std@@QAEXXZ) already defined in MyData.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 at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV01 at PBD@Z) already defined in libcpmtd.lib(locale0.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (?_Orphan_all at _Container_base_secure@std@@QBEXXZ) already defined in MyData.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 at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QBEIXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: bool __thiscall std::ios_base::fail(void)const " (?fail at ios_base@std@@QBE_NXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::basic_ios<char,struct std::char_traits<char> >::clear(int,bool)" (?clear@?$basic_ios at DU?$char_traits at D@std@@@std@@QAEXH_N at Z) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: int __thiscall std::ios_base::rdstate(void)const " (?rdstate at ios_base@std@@QBEHXZ) already defined in MyData.obj
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: class std::_String_iterator<char,struct std::char_traits<char>,class std::allocator<char> > __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::begin(void)" (?begin@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAE?AV?$_String_iterator at DU?$char_traits at D@std@@V?$allocator at D@2@@2 at XZ) already defined in libcpmtd.lib(cout.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 at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV12 at II@Z) already defined in MyData.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> >::append(unsigned int,char)" (?append@?$basic_string at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV12 at ID@Z) already defined in libcpmtd.lib(cout.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 at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV12 at PBD@Z) already defined in MyData.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 at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@QAEAAV12 at PBDI@Z) already defined in MyData.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 at DU?$char_traits at D@std@@V?$allocator at D@2@@std@@IAEPADXZ) already defined in MyData.obj
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __invalid_parameter already defined in LIBCMT.lib(invarg.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: virtual __thiscall std::exception::~exception(void)" (??1exception at std@@UAE at XZ) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(void)" (??0exception at std@@QAE at XZ) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(class std::exception const &)" (??0exception at std@@QAE at ABV01@@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: "public: __thiscall std::exception::exception(char const * const &)" (??0exception at std@@QAE at ABQBD@Z) already defined in LIBCMT.lib(stdexcpt.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _getenv already defined in LIBCMT.lib(getenv.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _exit already defined in LIBCMT.lib(crt0dat.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _free already defined in LIBCMT.lib(free.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _malloc already defined in LIBCMT.lib(malloc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _memmove_s already defined in LIBCMT.lib(memmove_s.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strncmp already defined in LIBCMT.lib(strncmp.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strcspn already defined in LIBCMT.lib(strcspn.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _memmove already defined in LIBCMT.lib(memmove.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _realloc already defined in LIBCMT.lib(realloc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _getc already defined in LIBCMT.lib(fgetc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _ungetc already defined in LIBCMT.lib(ungetc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _ftell already defined in LIBCMT.lib(ftell.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fclose already defined in LIBCMT.lib(fclose.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fopen already defined in LIBCMT.lib(fopen.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fread already defined in LIBCMT.lib(fread.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _atoi already defined in LIBCMT.lib(atox.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fseek already defined in LIBCMT.lib(fseek.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fgetc already defined in LIBCMT.lib(fgetc.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _isspace already defined in LIBCMT.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _abort already defined in LIBCMT.lib(abort.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strchr already defined in LIBCMT.lib(strchr.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _tolower already defined in LIBCMT.lib(tolower.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fwrite already defined in LIBCMT.lib(fwrite.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __errno already defined in LIBCMT.lib(dosmap.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: ___iob_func already defined in LIBCMT.lib(_file.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _isalpha already defined in LIBCMT.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _isupper already defined in LIBCMT.lib(_ctype.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __stricmp already defined in LIBCMT.lib(stricmp.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _strftime already defined in LIBCMT.lib(strftime.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: _fflush already defined in LIBCMT.lib(fflush.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: __thiscall type_info::type_info(class type_info const &)" (??0type_info@@AAE at ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRTD.lib(ti_inst.obj) : error LNK2005: "private: class type_info & __thiscall type_info::operator=(class type_info const &)" (??4type_info@@AAEAAV0 at ABV0@@Z) already defined in LIBCMT.lib(typinfo.obj)
1>MSVCRTD.lib(MSVCR90D.dll) : error LNK2005: __strdup already defined in LIBCMT.lib(strdup.obj)
1>LINK : warning LNK4098: defaultlib 'LIBCMT' conflicts with use of other libs; use /NODEFAULTLIB:library
1>LINK : warning LNK4098: defaultlib 'MSVCRTD' conflicts with use of other libs; use /NODEFAULTLIB:library
1>Debug/radu.exe : fatal error LNK1169: one or more multiply defined symbols found
1>Project : warning PRJ0018 : The following environment variables were not found:
 
 
I have no idea what all of this means...but I know I have included all the libs and dependencies (tha other vtk applications work).
 
Best,
Radu.


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091201/4009cfa5/attachment.htm>


More information about the vtkusers mailing list