Problem loading Ogre libraries

Get answers to all your basic programming questions. No Ogre questions, please!
repio
Gnoblar
Posts: 4
Joined: Thu Jun 07, 2012 1:40 pm

Problem loading Ogre libraries

Post by repio »

Hello everyone,

I'm a new (hopefully future) user of Ogre! I plan eventually to use it inside a Qt framework, but for now I focus on running Ogre.
It's been quite a week now I've been trying to setup and run an Ogre project starting from CMake up to Xcode, without success.

After having modified the CMakeLists available at the address:
http://www.ogre3d.org/tikiwiki/tiki-ind ... With+CMake
I managed to obtain a compilable project based on the tutorial.

Now I'm stuck when running the code. At some point, the Ogre libraries are loaded and I obtain:
Loading library /usr/local/lib/OGRERenderSystem_GL
An exception has occured: OGRE EXCEPTION(7:InternalErrorException): Could not load dynamic library /usr/local/lib/OGRERenderSystem_GL. System Error: dlopen(/usr/local/lib/OGRERenderSystem_GL.dylib, 9): image not found in DynLib::load at /Users/davidrogers/Documents/Ogre/ogre-v1-8/OgreMain/src/OgreDynLib.cpp (line 91)
The fact is that in my CMakeLists.txt, no path is supposed to point out such location. Furthermore, it looks like a "/" is missing between "OGRE" and "RenderSystem_GL".
So my questions are:
- are the path pointing to libraries /usr/local/lib/OGRE hard-coded ? (by the way why is there such path including davidrogers ??)
- if so, is there anyway to make this path determined by the CMake script instead ?

Thanks a lot for any answer,

repio
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Problem loading Ogre libraries

Post by jacmoe »

Looks like you need to perform a 'sudo ldconfig' - try that first. :)

Provided, of course, that you've installed Ogre.
Which you probably have, as it otherwise wouldn't even configure or compile.
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
repio
Gnoblar
Posts: 4
Joined: Thu Jun 07, 2012 1:40 pm

Re: Problem loading Ogre libraries

Post by repio »

Thanks for the answer! Actually I'm not sure I really installed Ogre. I just put the the Ogre.framework in /Library/Frameworks/ .
The fact is I want, at least for now, to only have Ogre (as much as possible) laying in ~/Ogre/
I managed to do that except this path when executing the code..

I read ldconfig is only available for unix/linux, and the equivalent for macOS is dyld. I can't figure how to use it properly.
repio
Gnoblar
Posts: 4
Joined: Thu Jun 07, 2012 1:40 pm

Re: Problem loading Ogre libraries

Post by repio »

Alright in fact I just had to modify the plugins.cfg to put the correct path.
The tutorial application now crashes after clicking 'Ok' but I suppose this is a different issue !
Thanks anyway.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179

Re: Problem loading Ogre libraries

Post by jacmoe »

D'oh - should have spotted that it was a 'dylib', not a 'so'.
I know nothing about a Mac, sorry. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.