Building MyGUI


30-09-2010 13:23:20

Hi there Ogre users and developers (to whom I apologise for posting in an incorrect section at first), and here is my problem:
I'm trying to build MyGUI with Visual Studio 2008, but what I get are 28 fatal errors like this:
c:\users\bugme\documents\visual studio 2008\projects\mygui\mygui\mygui_layoutmanager.cpp(34) : error C2491: 'MyGUI::Singleton<T>::msInstance' : definition of dllimport static data member not allowed
1> with
1> [
1> T=MyGUI::LayoutManager
1> ]
and 1536 (yes, this is the actual number) warnings which I'm guessing have something to do with the errors, like this:
1>c:\users\bugme\documents\visual studio 2008\projects\mygui\mygui\mygui_polygonalskin.cpp(426) : warning C4273: 'MyGUI::PolygonalSkin::_getMiddleLine' : inconsistent dll linkage
1> c:\users\bugme\documents\visual studio 2008\projects\mygui\mygui\mygui_polygonalskin.h(73) : see previous definition of '_getMiddleLine'
When i googled one of those errors, what I got were some pages explaining that using static variables in classes sometimes leads to such errors. Obviously, that's not the case here, so if anyone has a suggestion I'd more than glad to hear it. Thanks!


30-09-2010 16:34:02

Do you have SP1 installed for visual studio? That's very important, if you want to work with VS2008.
Also what you trying to compile? MyGUI version, do you use any specific CMake options?

And btw, I use Visual Studio 2008 and I have 0 errors and 0 warnings with /W3 and few warnings with /W4.


30-09-2010 19:05:19

Yeah, I do have SP1 installed. And what do you mean by CMake specific options? I'm not sure I get it, but I don't think I use any.
As for the warning options - it's not warnings that trouble me - it's the fatal errors :) Thanks anyway though, I'd be happy to hear any other suggestions you might have.


03-10-2010 18:07:28

Anyone, anything?