Page 1 of 1

Unresloved External

Posted: Fri Sep 16, 2016 06:27
by peymankop
Hi, when i add this line of code in my project:

Code: Select all

CEGUI::SchemeManager::getSingleton().createFromFile("TaharezLook.scheme");


it shows me below errors:

Code: Select all

 error LNK2001: unresolved external symbol "public: static unsigned int const CEGUI::String::npos" (?npos@String@CEGUI@@2IB)
1>GUIManager.obj : error LNK2001: unresolved external symbol "protected: static class CEGUI::Logger * CEGUI::Singleton<class CEGUI::Logger>::ms_Singleton" (?ms_Singleton@?$Singleton@VLogger@CEGUI@@@CEGUI@@1PAVLogger@2@A)
1>GUIManager.obj : error LNK2001: unresolved external symbol "public: static class CEGUI::String const CEGUI::ResourceEventSet::EventNamespace" (?EventNamespace@ResourceEventSet@CEGUI@@2VString@2@B)
1>GUIManager.obj : error LNK2001: unresolved external symbol "public: static class CEGUI::String const CEGUI::ResourceEventSet::EventResourceCreated" (?EventResourceCreated@ResourceEventSet@CEGUI@@2VString@2@B)
1>GUIManager.obj : error LNK2001: unresolved external symbol "public: static class CEGUI::String const CEGUI::ResourceEventSet::EventResourceDestroyed" (?EventResourceDestroyed@ResourceEventSet@CEGUI@@2VString@2@B)
1>GUIManager.obj : error LNK2001: unresolved external symbol "public: static class CEGUI::String const CEGUI::ResourceEventSet::EventResourceReplaced" (?EventResourceReplaced@ResourceEventSet@CEGUI@@2VString@2@B)
1>GUIManager.obj : error LNK2001: unresolved external symbol "protected: static class CEGUI::SchemeManager * CEGUI::Singleton<class CEGUI::SchemeManager>::ms_Singleton" (?ms_Singleton@?$Singleton@VSchemeManager@CEGUI@@@CEGUI@@1PAVSchemeManager@2@A)



i added below libraries:
CEGUIDirect3D11Renderer-0_d.lib
CEGUIBase-0_d.lib
CEGUICommonDialogs-0_d.lib
CEGUICoreWindowRendererSet_d.lib
CEGUIExpatParser_d.lib
freetype_d.lib
jpeg_d.lib
libexpat_d.lib
libpng_d.lib
pcre_d.lib
SILLY_d.lib
zlib_d.lib

i can skip these problem by adding ,obj files in my additional libraries but i know this is not the correct way to fix!
any idea?

Re: Unresloved External

Posted: Fri Sep 16, 2016 07:09
by Ident
Well it is clearly a linker error, so if you really really linked CEGUIBase into your project then it must mean that CEGUIBase does not contain the symbols in its lib... Just look at the SampleBrowser or Application template to see how we link things in a way it works and lean on that...

or do those two also not work for you?

Re: Unresloved External

Posted: Fri Sep 16, 2016 07:40
by peymankop
Ident wrote:Well it is clearly a linker error, so if you really really linked CEGUIBase into your project then it must mean that CEGUIBase does not contain the symbols in its lib... Just look at the SampleBrowser or Application template to see how we link things in a way it works and lean on that...

or do those two also not work for you?


no they work fine for me.

Re: Unresloved External

Posted: Tue Sep 20, 2016 02:16
by Lord Fers
The files in CMake and the project compiled, threw an error?
Verify and copy-paste the log-file please. (of CMake, and CEGUI)