Problem Linking MyGUI and OpenGLRenderer (linux)

Gasim

03-08-2011 11:43:04

Hello,
I am very very new to MyGUI (haven't written one single program with it). And it fits my requirements so far, so i wanna give it a try.

However, I am having trouble linking OpenGLRenderer static library to my project. Here is what I did:

1) Got source code from SVN.

2) Compiled the code using cmake and got my libMyGUIEngine.so and libMyGUI.OpenGLPlatform.ar

3) Copied the files into /usr/lib

4) test.cpp

MyGUI::OpenGLPlatform * platform = new MyGUI::OpenGLPlatform;
//platform->initialise(); --> Don't have an image loader yet. Will write it as soon as I finish linking.
MyGUI::Gui * gui = new MyGUI::Gui;
gui->initialise();


5. Makefile

ldflags:=-ldl -lMyGUI.OpenGLPlatform -lMyGUIEngine -luuid
cppflags:=-Imy-gui/MyGUIEngine/include -Imy-gui/Platforms/OpenGL/OpenGLPlatform/include

all: test

test: test.o
g++ $(ldflags) test.o -o test

test.o: test.cpp
g++ $(cppflags) test.cpp -c


I get a linker error:

test.o: In function `main':
test.cpp:(.text+0x20): undefined reference to `MyGUI::OpenGLPlatform::OpenGLPlatform()'
collect2: ld returned 1 exit status


I get no compilation problems and no linking problems with libMyGUIEngine.so (removed the opengl part and it worked but threw an exception :P )

What am I doing wrong?

Thanks in advance,