Compil project with CEGUI

For help with general CEGUI usage:
- Questions about the usage of CEGUI and its features, if not explained in the documentation.
- Problems with the CMAKE configuration or problems occuring during the build process/compilation.
- Errors or unexpected behaviour.

Moderators: CEGUI MVP, CEGUI Team

K-geoir
Just popping in
Just popping in
Posts: 4
Joined: Thu Aug 23, 2007 14:06

Compil project with CEGUI

Postby K-geoir » Wed Aug 29, 2007 22:03

Hello, Hello

I try to use CEGUI with a simple main :

# include "CEGUI/CEGUI.h"
# include "CEGUI/RendererModules/OpenGLGUIRenderer/openglrenderer.h"

int main (void)
{
CEGUI::OpenGLRenderer* myrend = new CEGUI::OpenGLRenderer (0, 800, 600);
CEGUI::System* sys = new CEGUI::System(myrend);
CEGUI::System::getSingleton().renderGUI();

return 0;
}



and my makefile compile with :
all:
$(CC) $(CFLAGS) $(OBJ) -o $(EXEC) -I/usr/include/CEGUI -I/usr/includeCEGUI/RendererModules/OpenGLGUIRenderer/openglrenderer.h -I/usr/local/lib
-I/usr/local/include -I/usr/local/include/CEGUI -lCEGUIBase -lCEGUIOpenGLRenderer -lCEGUISampleHelper

It is compiling but when I execute I got this error:
./test: error while loading shared libraries: libCEGUISampleHelper.so.1: cannot open shared object file: No such file or directory


I checked and I have this file in /usr/local/lib

What can I do ?

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Thu Aug 30, 2007 10:14

Tho I have not been developing in linux for quite some time (i used to a lot), my recollection is that LD_LIBRARY_PATH (load library path) is pertinent for executables that require shared object libraries that are not in the standard location for shared libraries. The load library path specifies a semi-colon separated list of directories containing additional paths for the run-time linker to look.

At compile time just make sure that you specify -L pathname to tell the linker where to find object libraries. So use -L not -I for library directories.

K-geoir
Just popping in
Just popping in
Posts: 4
Joined: Thu Aug 23, 2007 14:06

Postby K-geoir » Thu Aug 30, 2007 15:47

I try this already... I think I will put the CEGUI src in my project!!!

daves
Home away from home
Home away from home
Posts: 253
Joined: Thu Feb 02, 2006 20:12

Postby daves » Fri Aug 31, 2007 09:49

I build cegui from source, tho I do not include it in my project. I just have a separate project for it. I really dont think including the source in your project is the answer. I think you just need to play with your compiler/linker options to make sure the compiler/linker know where to find the libraries.


Return to “Help”

Who is online

Users browsing this forum: No registered users and 3 guests