[Solved]Linking errors with MyGUI 3.0.1 and Ogre 1.7.1

majc

07-09-2010 23:33:36

I tried to run my Ogre application with MyGUI 3.0.1 and gave me this errors:

1>------ Build started: Project: Dark Future, Configuration: Debug Win32 ------
1>Linking...
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: void __thiscall MyGUI::Gui::initialise(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?initialise@Gui@MyGUI@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) referenced in function "public: void __thiscall cCreateWorld::setupWorld(void)" (?setupWorld@cCreateWorld@@QAEXXZ)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MyGUI::Gui::Gui(void)" (__imp_??0Gui@MyGUI@@QAE@XZ) referenced in function "public: void __thiscall cCreateWorld::setupWorld(void)" (?setupWorld@cCreateWorld@@QAEXXZ)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "private: virtual class MyGUI::Widget * __thiscall MyGUI::Gui::baseCreateWidget(struct MyGUI::WidgetStyle,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,struct MyGUI::types::TCoord<int> const &,struct MyGUI::Align,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?baseCreateWidget@Gui@MyGUI@@EAEPAVWidget@2@UWidgetStyle@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@1ABU?$TCoord@H@types@2@UAlign@2@11@Z)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall MyGUI::Gui::_destroyChildWidget(class MyGUI::Widget *)" (?_destroyChildWidget@Gui@MyGUI@@EAEXPAVWidget@2@@Z)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall MyGUI::Gui::_destroyAllChildWidget(void)" (?_destroyAllChildWidget@Gui@MyGUI@@EAEXXZ)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall MyGUI::Gui::_linkChildWidget(class MyGUI::Widget *)" (?_linkChildWidget@Gui@MyGUI@@EAEXPAVWidget@2@@Z)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall MyGUI::Gui::_unlinkChildWidget(class MyGUI::Widget *)" (?_unlinkChildWidget@Gui@MyGUI@@EAEXPAVWidget@2@@Z)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "private: virtual void __thiscall MyGUI::Gui::_unlinkWidget(class MyGUI::Widget *)" (?_unlinkWidget@Gui@MyGUI@@EAEXPAVWidget@2@@Z)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "public: __thiscall MyGUI::OgreRenderManager::OgreRenderManager(void)" (??0OgreRenderManager@MyGUI@@QAE@XZ) referenced in function "public: __thiscall MyGUI::OgrePlatform::OgrePlatform(void)" (??0OgrePlatform@MyGUI@@QAE@XZ)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "public: void __thiscall MyGUI::OgreDataManager::initialise(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@OgreDataManager@MyGUI@@QAEXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z) referenced in function "public: void __thiscall MyGUI::OgrePlatform::initialise(class Ogre::RenderWindow *,class Ogre::SceneManager *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@OgrePlatform@MyGUI@@QAEXPAVRenderWindow@Ogre@@PAVSceneManager@4@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2@Z)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "public: void __thiscall MyGUI::OgreRenderManager::initialise(class Ogre::RenderWindow *,class Ogre::SceneManager *)" (?initialise@OgreRenderManager@MyGUI@@QAEXPAVRenderWindow@Ogre@@PAVSceneManager@4@@Z) referenced in function "public: void __thiscall MyGUI::OgrePlatform::initialise(class Ogre::RenderWindow *,class Ogre::SceneManager *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@OgrePlatform@MyGUI@@QAEXPAVRenderWindow@Ogre@@PAVSceneManager@4@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2@Z)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static void __cdecl MyGUI::LogManager::registerSection(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (__imp_?registerSection@LogManager@MyGUI@@SAXABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0@Z) referenced in function "public: void __thiscall MyGUI::OgrePlatform::initialise(class Ogre::RenderWindow *,class Ogre::SceneManager *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?initialise@OgrePlatform@MyGUI@@QAEXPAVRenderWindow@Ogre@@PAVSceneManager@4@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@2@Z)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MyGUI::DataManager::~DataManager(void)" (__imp_??1DataManager@MyGUI@@UAE@XZ) referenced in function __unwindfunclet$??0OgreDataManager@MyGUI@@QAE@XZ$0
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MyGUI::DataManager::DataManager(void)" (__imp_??0DataManager@MyGUI@@QAE@XZ) referenced in function "public: __thiscall MyGUI::OgreDataManager::OgreDataManager(void)" (??0OgreDataManager@MyGUI@@QAE@XZ)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "public: virtual class MyGUI::IDataStream * __thiscall MyGUI::OgreDataManager::getData(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?getData@OgreDataManager@MyGUI@@UAEPAVIDataStream@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "public: virtual bool __thiscall MyGUI::OgreDataManager::isDataExist(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?isDataExist@OgreDataManager@MyGUI@@UAE_NABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "public: virtual class std::vector<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >,class std::allocator<class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > > > const & __thiscall MyGUI::OgreDataManager::getDataListNames(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?getDataListNames@OgreDataManager@MyGUI@@UAEABV?$vector@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@V?$allocator@V?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@2@@std@@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@4@@Z)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "public: virtual class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __thiscall MyGUI::OgreDataManager::getDataPath(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &)" (?getDataPath@OgreDataManager@MyGUI@@UAEABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@ABV34@@Z)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: virtual __thiscall MyGUI::Gui::~Gui(void)" (__imp_??1Gui@MyGUI@@UAE@XZ) referenced in function "public: virtual void * __thiscall MyGUI::Gui::`scalar deleting destructor'(unsigned int)" (??_GGui@MyGUI@@UAEPAXI@Z)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MyGUI::Exception::Exception(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,char const *,long)" (__imp_??0Exception@MyGUI@@QAE@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@0PBDJ@Z) referenced in function "public: __thiscall MyGUI::Singleton<class MyGUI::OgreDataManager>::Singleton<class MyGUI::OgreDataManager>(void)" (??0?$Singleton@VOgreDataManager@MyGUI@@@MyGUI@@QAE@XZ)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: class MyGUI::LogStream & __thiscall MyGUI::LogStream::operator<<(struct MyGUI::LogStream::LogStreamEnd const &)" (__imp_??6LogStream@MyGUI@@QAEAAV01@ABULogStreamEnd@01@@Z) referenced in function "public: __thiscall MyGUI::Singleton<class MyGUI::OgreDataManager>::Singleton<class MyGUI::OgreDataManager>(void)" (??0?$Singleton@VOgreDataManager@MyGUI@@@MyGUI@@QAE@XZ)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class MyGUI::LogStream & __cdecl MyGUI::LogManager::out(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,enum MyGUI::LogManager::LogLevel)" (__imp_?out@LogManager@MyGUI@@SAAAVLogStream@2@ABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@W4LogLevel@12@@Z) referenced in function "public: __thiscall MyGUI::Singleton<class MyGUI::OgreDataManager>::Singleton<class MyGUI::OgreDataManager>(void)" (??0?$Singleton@VOgreDataManager@MyGUI@@@MyGUI@@QAE@XZ)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "protected: static char const * const MyGUI::Singleton<class MyGUI::OgreDataManager>::INSTANCE_TYPE_NAME" (?INSTANCE_TYPE_NAME@?$Singleton@VOgreDataManager@MyGUI@@@MyGUI@@1PBDB)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const & __cdecl MyGUI::LogManager::info(char const *,int)" (__imp_?info@LogManager@MyGUI@@SAABV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@PBDH@Z) referenced in function "public: __thiscall MyGUI::Singleton<class MyGUI::OgreDataManager>::Singleton<class MyGUI::OgreDataManager>(void)" (??0?$Singleton@VOgreDataManager@MyGUI@@@MyGUI@@QAE@XZ)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) public: static struct MyGUI::LogStream::LogStreamEnd const & __cdecl MyGUI::LogManager::end(void)" (__imp_?end@LogManager@MyGUI@@SAABULogStreamEnd@LogStream@2@XZ) referenced in function "public: __thiscall MyGUI::Singleton<class MyGUI::OgreDataManager>::Singleton<class MyGUI::OgreDataManager>(void)" (??0?$Singleton@VOgreDataManager@MyGUI@@@MyGUI@@QAE@XZ)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "public: virtual __thiscall MyGUI::Exception::~Exception(void)" (??1Exception@MyGUI@@UAE@XZ)
1>cCreateWorld.obj : error LNK2001: unresolved external symbol "public: __thiscall MyGUI::Exception::Exception(class MyGUI::Exception const &)" (??0Exception@MyGUI@@QAE@ABV01@@Z)
1>cCreateWorld.obj : error LNK2019: unresolved external symbol "__declspec(dllimport) private: bool __thiscall MyGUI::LogStream::getSTDOutputEnabled(void)" (__imp_?getSTDOutputEnabled@LogStream@MyGUI@@AAE_NXZ) referenced in function "public: class MyGUI::LogStream & __thiscall MyGUI::LogStream::operator<<<char const *>(char const *)" (??$?6PBD@LogStream@MyGUI@@QAEAAV01@PBD@Z)
1>C:\ogrenew\Dark Future\Debug\Dark Future.exe : fatal error LNK1120: 28 unresolved externals
1>Build log was saved at "file://c:\ogrenew\Dark Future\Dark Future\Debug\BuildLog.htm"
1>Dark Future - 29 error(s), 0 warning(s)
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========


It seems a missing lib reference but i think i have them all.

Additional Dependencies:

Linker->Input:

Common_d.lib
MyGUI.OgrePlatform_d.lib
MyGUIEngine_d.lib

Linker->General:

C:\ogrenew\Dependencies\lib\Debug

Inside the above folder i have these libs:

MyGUI.OgrePlatform.Export_d.lib
MyGUI.OgrePlatform_d.lib
MyGUIEngine_d.lib
Common_d.lib

What I'm missing?

Altren

08-09-2010 02:24:09

Well, you have errors as if you have not linked bot MyGUIEngine_d.lib and MyGUI.OgrePlatform_d.lib.
Also you don't need Common.lib - it is used in demos, and you don't need MyGUI.OgrePlatform.Export_d.lib - it is used for MyGUI and C# builds.

majc

08-09-2010 09:39:33

But i have both files in C:\ogrenew\Dependencies\lib\Debug and i have the configuration above. What's missing?

majc

09-09-2010 20:51:14

Problem solved, i compiled MyGUI in win 64 but my aplication it's compiled in win 32 debug