MyGUI 3.2.0 - Demos won't work after compilation

jadam

25-05-2012 14:54:37

Hi,

I'm new to OGRE and MyGUI too, but read quite some of the available infos (tutorials, readmes, the Read this first post, FAQ, etc) but I can't solve this issue:

I used CMake with MinGW to compile MyGUI, which I succeeded after a while. Now however none of the compiled .exe works (neither the demos, nor the tools or tests), I keep getting the following error:


Assertion failed!

Program: ...
File: ../../../../../OgreMain/src/OgreRoot.cpp
Line: 112
Expression: ms_Singleton


I don't see any MyGUI log generated, and here is what the ogre.log contains:

15:44:41: Creating resource group General
15:44:41: Creating resource group Internal
15:44:41: Creating resource group Autodetect
15:44:41: SceneManagerFactory for type 'DefaultSceneManager' registered.
15:44:41: Registering ResourceManager for type Material
15:44:41: Registering ResourceManager for type Mesh
15:44:41: Registering ResourceManager for type Skeleton
15:44:41: MovableObjectFactory for type 'ParticleSystem' registered.
15:44:41: OverlayElementFactory for type Panel registered.
15:44:41: OverlayElementFactory for type BorderPanel registered.
15:44:41: OverlayElementFactory for type TextArea registered.
15:44:41: Registering ResourceManager for type Font
15:44:41: ArchiveFactory for archive type FileSystem registered.
15:44:41: ArchiveFactory for archive type Zip registered.
15:44:41: DDS codec registering
15:44:41: FreeImage version: 3.13.1
15:44:41: This program uses FreeImage, a free, open source image library supporting all common bitmap formats. See http://freeimage.sourceforge.net for details
15:44:41: Supported formats: bmp,ico,jpg,jif,jpeg,jpe,jng,koa,iff,lbm,mng,pbm,pbm,pcd,pcx,pgm,pgm,png,ppm,ppm,ras,tga,targa,tif,tiff,wap,wbmp,wbm,psd,cut,xbm,xpm,gif,hdr,g3,sgi,exr,j2k,j2c,jp2,pfm,pct,pict,pic,bay,bmq,cr2,crw,cs1,dc2,dcr,dng,erf,fff,hdr,k25,kdc,mdc,mos,mrw,nef,orf,pef,pxn,raf,raw,rdc,sr2,srf,arw,3fr,cine,ia,kc2,mef,nrw,qtk,rw2,sti,drf,dsc,ptx,cap,iiq,rwz
15:44:41: Registering ResourceManager for type HighLevelGpuProgram
15:44:41: Registering ResourceManager for type Compositor
15:44:41: MovableObjectFactory for type 'Entity' registered.
15:44:41: MovableObjectFactory for type 'Light' registered.
15:44:41: MovableObjectFactory for type 'BillboardSet' registered.
15:44:41: MovableObjectFactory for type 'ManualObject' registered.
15:44:41: MovableObjectFactory for type 'BillboardChain' registered.
15:44:41: MovableObjectFactory for type 'RibbonTrail' registered.
15:44:41: Loading library .\RenderSystem_Direct3D9_d


So as I mentioned in the title I am trying MyGUI version 3.2.0 and Ogre version 1.7.2 with MinGW. I wonder if that ogre version is not compatible with this newest MyGUI version by chance?

I used CMake to compile MyGUI against ogre 1.7.2 and I also tried to add the Demo_Colour source files to a netbeans project and compile them manually by creating a makefile, but there I can't get rid of these errors:

GNU-amd64-Windows/DemoKeeper.o:DemoKeeper.cpp:(.rdata$_ZTVN4demo10DemoKeeperE[vtable for demo::DemoKeeper]+0x38): undefined reference to `base::BaseManager::loadImage(int&, int&, MyGUI::PixelFormat&, std::string const&)'
GNU-amd64-Windows/DemoKeeper.o:DemoKeeper.cpp:(.rdata$_ZTVN4demo10DemoKeeperE[vtable for demo::DemoKeeper]+0x3c): undefined reference to `base::BaseManager::saveImage(int, int, MyGUI::PixelFormat, void*, std::string const&)'
GNU-amd64-Windows/DemoKeeper.o:DemoKeeper.cpp:(.rdata$_ZTVN4demo10DemoKeeperE[vtable for demo::DemoKeeper]+0x6c): undefined reference to `non-virtual thunk to base::BaseManager::loadImage(int&, int&, MyGUI::PixelFormat&, std::string const&)'
GNU-amd64-Windows/DemoKeeper.o:DemoKeeper.cpp:(.rdata$_ZTVN4demo10DemoKeeperE[vtable for demo::DemoKeeper]+0x70): undefined reference to `non-virtual thunk to base::BaseManager::saveImage(int, int, MyGUI::PixelFormat, void*, std::string const&)'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text+0x1500): undefined reference to `MyGUI::OgreRenderManager::getInstance()'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text+0x1508): undefined reference to `MyGUI::OgreRenderManager::getBatchCount() const'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text$_ZN5MyGUI12OgrePlatformC1Ev[MyGUI::OgrePlatform::OgrePlatform()]+0x3c): undefined reference to `MyGUI::OgreRenderManager::OgreRenderManager()'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text$_ZN5MyGUI12OgrePlatformC1Ev[MyGUI::OgrePlatform::OgrePlatform()]+0x58): undefined reference to `MyGUI::OgreDataManager::OgreDataManager()'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text$_ZN5MyGUI12OgrePlatform10initialiseEPN4Ogre12RenderWindowEPNS1_12SceneManagerERKSsS7_[MyGUI::OgrePlatform::initialise(Ogre::RenderWindow*, Ogre::SceneManager*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x6f): undefined reference to `MyGUI::OgreRenderManager::initialise(Ogre::RenderWindow*, Ogre::SceneManager*)'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text$_ZN5MyGUI12OgrePlatform10initialiseEPN4Ogre12RenderWindowEPNS1_12SceneManagerERKSsS7_[MyGUI::OgrePlatform::initialise(Ogre::RenderWindow*, Ogre::SceneManager*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)]+0x84): undefined reference to `MyGUI::OgreDataManager::initialise(std::string const&)'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text$_ZN5MyGUI12OgrePlatform8shutdownEv[MyGUI::OgrePlatform::shutdown()]+0x3b): undefined reference to `MyGUI::OgreRenderManager::shutdown()'
..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a(BaseManager.cpp.obj):BaseManager.cpp:(.text$_ZN5MyGUI12OgrePlatform8shutdownEv[MyGUI::OgrePlatform::shutdown()]+0x49): undefined reference to `MyGUI::OgreDataManager::shutdown()'


Although I'm not very experienced with C++, I thought this might be caused by (a) missing library(s), so here is my Makefile (generated via netbeans then i was editing it to narrow down the errors to what I just quoted):
CCC = g++
CXX = g++
BASICOPTS = -g
CCFLAGS = $(BASICOPTS)
CXXFLAGS = $(BASICOPTS)
CCADMIN =


# Define the target directories.
TARGETDIR_Demo_colour=GNU-amd64-Windows


all: $(TARGETDIR_Demo_colour)/Demo_colour

## Target: Demo_colour
CPPFLAGS_Demo_colour = \
-IC:/docs/ogre3d/MyGUI_3.2.0/Common \
-IC:/docs/ogre3d/MyGUI_3.2.0/MyGUIEngine/include \
-IC:/docs/ogre3d/MyGUI_3.2.0/Common/Base/OpenGL \
-IC:/docs/ogre3d/MyGUI_3.2.0/Platforms/OpenGL/OpenGLPlatform/include \
-IC:/docs/ogre3d/MyGUI_3.2.0/Common/Input/Win32_OIS \
-IC:/docs/ogre3d/ogre172deps/ois/include

OBJS_Demo_colour = \
$(TARGETDIR_Demo_colour)/ColourPanel.o \
$(TARGETDIR_Demo_colour)/DemoKeeper.o \
$(TARGETDIR_Demo_colour)/EditPanel.o
USERLIBS_Demo_colour = C:\docs\ogre3d\OgreSDK_mingw_v1-7-2\bin\Debug\RenderSystem_GL_d.dll C:\docs\ogre3d\MyGUI_3.2.0_SDK\bin\freetype6.dll C:\docs\ogre3d\MyGUI_3.2.0_SDK\bin\libMyGUIEngine.dll C:\docs\ogre3d\OgreSDK_mingw_v1-7-2\bin\Debug\OgreMain_d.dll C:\docs\ogre3d\myguideps\libOIS_d.dll C:\docs\ogre3d\ogre172deps\freetype\lib\freetype.lib C:\docs\ogre3d\ogre172deps\ois\lib\debug\OISd.lib ..\..\..\MyGUI_3.2.0_SDK\lib\libCommon.a $(SYSLIBS_Demo_colour)
DEPLIBS_Demo_colour =
LDLIBS_Demo_colour = $(USERLIBS_Demo_colour)


# Link or archive
$(TARGETDIR_Demo_colour)/Demo_colour: $(TARGETDIR_Demo_colour) $(OBJS_Demo_colour) $(DEPLIBS_Demo_colour)
$(LINK.cc) $(CCFLAGS_Demo_colour) $(CPPFLAGS_Demo_colour) -o $@ $(OBJS_Demo_colour) $(LDLIBS_Demo_colour)


# Compile source files into .o files
$(TARGETDIR_Demo_colour)/ColourPanel.o: $(TARGETDIR_Demo_colour) ColourPanel.cpp
$(COMPILE.cc) $(CCFLAGS_Demo_colour) $(CPPFLAGS_Demo_colour) -o $@ ColourPanel.cpp -lOIS -lOgreMain -lfreetype -lMyGUIEngine -lMyGUI.OgrePlatform

$(TARGETDIR_Demo_colour)/DemoKeeper.o: $(TARGETDIR_Demo_colour) DemoKeeper.cpp
$(COMPILE.cc) $(CCFLAGS_Demo_colour) $(CPPFLAGS_Demo_colour) -o $@ DemoKeeper.cpp -lOIS -lOgreMain -lfreetype -lMyGUIEngine -lMyGUI.OgrePlatform

$(TARGETDIR_Demo_colour)/EditPanel.o: $(TARGETDIR_Demo_colour) EditPanel.cpp
$(COMPILE.cc) $(CCFLAGS_Demo_colour) $(CPPFLAGS_Demo_colour) -o $@ EditPanel.cpp -lOIS -lOgreMain -lfreetype -lMyGUIEngine -lMyGUI.OgrePlatform



#### Clean target deletes all generated files ####
clean:
rm -f \
$(TARGETDIR_Demo_colour)/Demo_colour \
$(TARGETDIR_Demo_colour)/ColourPanel.o \
$(TARGETDIR_Demo_colour)/DemoKeeper.o \
$(TARGETDIR_Demo_colour)/EditPanel.o
$(CCADMIN)
rm -f -r $(TARGETDIR_Demo_colour)


# Create the target directory (if needed)
$(TARGETDIR_Demo_colour):
mkdir -p $(TARGETDIR_Demo_colour)


# Enable dependency checking
.KEEP_STATE:
.KEEP_STATE_FILE:.make.state.GNU-amd64-Windows


Again, I'm quite new to makefiles and the secrets of compiling, linking, so there might be some very trivial thing(s) I am missing or messed up.

Thank you for your help,
Adam.

jadam

25-05-2012 21:18:38

I just tried with VC2010 express and everything seems to work flawlessly, although I used here the newest (1.7.4) OGRE, I don't know if that matters or not...

Adam.