Page 1 of 1

do i need to compile dependencie in Multithreaded Debug DLL?

Posted: Tue Sep 20, 2011 07:14
by umen
Hi
i already asked the question similar before bot now i successfully compile CEGUI in Multithreaded Debug DLL mode.
when i try to link it with my application it gives me errors, do i need to compile the dependencies also in Multithreaded Debug DLL ??
like this :

Code: Select all

>foo.obj : warning LNK4075: ignoring '/EDITANDCONTINUE' due to '/INCREMENTAL:NO' specification
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::~_Container_base_secure(void)" (??1_Container_base_secure@std@@QAE@XZ) already defined in SILLY_d.lib(SILLYImageLoaderManager.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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@XZ) already defined in SILLY_d.lib(SILLYImageLoaderManager.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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QAE@PBD@Z) already defined in SILLY_d.lib(SILLYImageLoaderManager.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 SILLY_d.lib(SILLYImageLoaderManager.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@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@QBEPBDXZ) already defined in SILLY_d.lib(SILLYImageLoaderManager.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_Container_base_secure::_Container_base_secure(void)" (??0_Container_base_secure@std@@QAE@XZ) already defined in SILLY_d.lib(SILLYImageLoaderManager.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: void __thiscall std::_Container_base_secure::_Orphan_all(void)const " (?_Orphan_all@_Container_base_secure@std@@QBEXXZ) already defined in SILLY_d.lib(SILLYImageLoaderManager.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "public: __thiscall std::_String_val<char,class std::allocator<char> >::~_String_val<char,class std::allocator<char> >(void)" (??1?$_String_val@DV?$allocator@D@std@@@std@@QAE@XZ) already defined in SILLY_d.lib(SILLYImageLoaderManager.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "protected: void __thiscall std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >::_Tidy(bool,unsigned int)" (?_Tidy@?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@IAEX_NI@Z) already defined in SILLY_d.lib(SILLYImageLoaderManager.obj)
1>msvcprtd.lib(MSVCP90D.dll) : error LNK2005: "protected: __thiscall std::_String_val<char,class std::allocator<char> >::_String_val<char,class std::allocator<char> >(class std::allocator<char>)" (??0?$_String_val@DV?$allocator@D@std@@@std@@IAE@V?$allocator@D@1@@Z) already defined in SILLY_d.lib(SILLYImageLoaderManager.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 SILLY_d.lib(SILLYImageLoaderManager.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 SILLY_d.lib(SILLYImageLoaderManager.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 SILLY_d.lib(SILLYImageLoaderManager.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 SILLY_d.lib(SILLYImageLoaderManager.obj)
1>LIBCMTD.lib(dbgheap.obj) : error LNK2005: __CrtSetCheckCount already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(dbghook.obj) : error LNK2005: __crt_debugger_hook already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(setlocal.obj) : error LNK2005: __configthreadlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(setlocal.obj) : error LNK2005: _setlocale already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __encode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(tidtable.obj) : error LNK2005: __decode_pointer already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(sprintf.obj) : error LNK2005: _sprintf already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: _exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __exit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __cexit already defined in MSVCRTD.lib(MSVCR90D.dll)
1>LIBCMTD.lib(crt0dat.obj) : error LNK2005: __amsg_exit already defined in MSVCRTD.lib(MSVCR90D.dll)

Re: do i need to compile dependencie in Multithreaded Debug

Posted: Tue Sep 20, 2011 16:03
by Jamarr
Long Answer: all of the libraries your project links to should themselves be linking to the same MSVC Runtime that your project links too. The pre-compiled DLL libraries link to the DLL-runtime and the pre-compiled Static libraries link to the Static-runtime. If you are using a configuration different from those two, such as building Static libraries linking to the DLL-runtime, then you will need to rebuild CEGUI and all dependencies using that same configuration.

Short Answer: yes.

Re: do i need to compile dependencie in Multithreaded Debug

Posted: Tue Sep 20, 2011 18:16
by umen
Ok thanks for the replay , how can i compile CEGUI with minimum dependencies ?

Re: do i need to compile dependencie in Multithreaded Debug

Posted: Thu Sep 22, 2011 05:38
by umen
what im missing here ?
i compile all the lib's that the CEGUI depend on them and also the CEGUI them self . with no problem
but now when i try to run simple GUI application im getting link error . like this :

Code: Select all

CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _iluInit@0 referenced in function "public: __thiscall CEGUI::DevILImageCodec::DevILImageCodec(void)" (??0DevILImageCodec@CEGUI@@QAE@XZ)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilInit@0 referenced in function "public: __thiscall CEGUI::DevILImageCodec::DevILImageCodec(void)" (??0DevILImageCodec@CEGUI@@QAE@XZ)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilPopAttrib@0 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilDeleteImages@8 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilCopyPixels@36 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _iluGetImageInfo@4 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilLoadL@12 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilBindImage@4 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilGenImages@8 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilEnable@4 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilOriginFunc@4 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
CEGUIDevILImageCodec_Static_d.lib(CEGUIDevILImageCodec.obj) : error LNK2019: unresolved external symbol _ilPushAttrib@4 referenced in function "public: virtual class CEGUI::Texture * __thiscall CEGUI::DevILImageCodec::load(class CEGUI::RawDataContainer const &,class CEGUI::Texture *)" (?load@DevILImageCodec@CEGUI@@UAEPAVTexture@2@ABVRawDataContainer@2@PAV32@@Z)
.\Debug/glsample.exe : fatal error LNK1120: 12 unresolved externals


the libs are in the my path and i compile it statically
i have does libs in my projects linker configuration
all are static libs in Multi-threaded Debug DLL (/MDd)

Code: Select all

 winmm.lib
opengl32.lib
glu32.lib
CEGUIBase_Static_d.lib
CEGUIDevILImageCodec_Static_d.lib
CEGUIExpatParser_Static_d.lib
CEGUIFalagardWRBase_Static_d.lib
CEGUIFreeImageImageCodec_Static_d.lib
CEGUIOpenGLRenderer_Static_d.lib
CEGUISILLYImageCodec_Static_d.lib
CEGUISTBImageCodec_Static_d.lib
CEGUITGAImageCodec_Static_d.lib
FreeImaged.lib
SILLY__static_d.lib < --- compiled it statically according to this link
http://www.cegui.org.uk/phpBB2/viewtopic.php?f=10&t=3996
freetype2312MT_D.lib
jpegd.lib
libexpatwMT.lib
libpngd.lib
pcrecppd.lib
pcred.lib
zlibd.lib
libtiff394-static-mtdll-debug.lib


also here is my project preprocessor flags

Code: Select all

 WIN32
_DEBUG
_WINDOWS
CEGUI_STATIC
TOLUA_STATIC
SILLY_STATIC


what is wrong here ? please advice

Re: do i need to compile dependencie in Multithreaded Debug

Posted: Thu Sep 22, 2011 10:57
by umen
solved the problem , not as i like it but hell .. its also something
the problem was i was missing the DevIL dll's .
i have lock and the dll's are compiled as mtdll .... and its problem to compile them as static lib.