OSX: Cannot load Ogre dylib at runtime

Problems building or running the engine, queries about how to use features etc.
Post Reply
golgobot
Gnoblar
Posts: 18
Joined: Tue Oct 03, 2017 11:26 pm

OSX: Cannot load Ogre dylib at runtime

Post by golgobot »

I'm currently build Ogre 1.10.7 on OSX 10.10.5. My install prefix is a custom location. I'm able to build ogre, and build my app linking against ogre. When I try to run my app I get this error

Code: Select all

dyld: Library not loaded: @executable_path/../Frameworks/Ogre.framework/Versions/1.10.7/Ogre
My question is, why is it looking for the library relative to my executable_path? Running otool, everything is an absolute path or relative to rpath, except for ogre which is relative to my executable path, which is completely wrong. Where is this path set and how do I change it so that it points to the correct directory. Thanks!

Code: Select all

 otool -L ../lib/libGolgobotGraphics.1.dylib
../lib/libGolgobotGraphics.1.dylib:
	/Users/jonathan/v2/buildlocal/build/lib/libPocoUtil.49.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/jonathan/v2/buildlocal/build/lib/libPocoXML.49.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/jonathan/v2/buildlocal/build/lib/libPocoJSON.49.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/jonathan/v2/buildlocal/build/lib/libPocoNet.49.dylib (compatibility version 0.0.0, current version 0.0.0)
	/Users/jonathan/v2/buildlocal/build/lib/libPocoFoundation.49.dylib (compatibility version 0.0.0, current version 0.0.0)
	@rpath/libdlib.19.7.0.dylib (compatibility version 0.0.0, current version 19.7.0)
	/usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 1213.0.0)
	@executable_path/../Frameworks/Ogre.framework/Versions/1.10.7/Ogre (compatibility version 1.10.7, current version 1.10.7)
	@rpath/QtWebEngine.framework/Versions/5/QtWebEngine (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtWebEngineCore.framework/Versions/5/QtWebEngineCore (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtQuick.framework/Versions/5/QtQuick (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtQml.framework/Versions/5/QtQml (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtNetwork.framework/Versions/5/QtNetwork (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtCore.framework/Versions/5/QtCore (compatibility version 5.9.0, current version 5.9.0)
	/System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/IOKit.framework/Versions/A/IOKit (compatibility version 1.0.0, current version 275.0.0)
	@rpath/QtGui.framework/Versions/5/QtGui (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtWebChannel.framework/Versions/5/QtWebChannel (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtPositioning.framework/Versions/5/QtPositioning (compatibility version 5.9.0, current version 5.9.0)
	@rpath/QtWebSockets.framework/Versions/5/QtWebSockets (compatibility version 5.9.0, current version 5.9.0)
	/System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL (compatibility version 1.0.0, current version 1.0.0)
	/System/Library/Frameworks/AGL.framework/Versions/A/AGL (compatibility version 1.0.0, current version 1.0.0)
	/usr/lib/libc++.1.dylib (compatibility version 1.0.0, current version 120.0.0)
Post Reply