linker error on createWidget

dest

05-12-2008 21:55:19

Just starting off using MyGUI and I'm trying to get the quickstart tutorial going. Everything works up to and including creating the GUI and calling initialise. However as soon as I call GUI->createWidget I get a linker error. Here's the first one of four -
gui error LNK2019: unresolved external symbol "__declspec(dllimport) public: __thiscall MyGUI::Align::Align(int)" (__imp_??0Align@MyGUI@@QAE@H@Z) referenced in function "public: __thiscall guiFrameListener::guiFrameListener(class Ogre::SceneManager *,class Ogre::RenderWindow *,class Ogre::Camera *,class MyGUI::Gui *)" (??0guiFrameListener@@QAE@PAVSceneManager@Ogre@@PAVRenderWindow@2@PAVCamera@2@PAVGui@MyGUI@@@Z)


And this is the line that causes it -
MyGUI::ButtonPtr button = mGUI->createWidget<MyGUI::Button>("Button", 10, 10, 300, 26, MyGUI::ALIGN_DEFAULT, "Main");

MyGUI_d.lib is being linked along with OgreMain_d.lib and OIS_d.lib, so I've no idea where this is coming from. I'm using Visual Studio 2003, is it possible that's causing the problem? I compiled MyGUI from source in VS2003 aswell. Any help would be much appreciated.

Cheers.

Altren

06-12-2008 00:16:00

Yes, it's problem of Visual Studio 2003. Which MyGUI version you use? As far as I remember we found and rewrote such code in MyGUI 2.2.0RC1, but now it's again here and it's really hard to fix it, but we are working on it.

dest

06-12-2008 00:36:17

Yeah I'm using 2.2.0RC1, ill give it a try with VS2005 and see if I can get it going. Thanks for your help.