[osg-users] Mac bundle distribution can't use plugin
Stephan Maximilian Huber
ratzfatz at digitalmind.de
Fri Nov 20 09:21:14 PST 2009
check your system.log-file -- I am pretty sure the osgdb_obj pluging
refers to the osg-dylibs in /usr/lib or similar.
You'll have to massage the paths to the libs stored in the plugin via
install_name_tool in a post-build-step.
Paths to libs are hardcoded in the object-file when linked. You can
change them to something better suited like @loader_path.../pipapo. Try
googling for install_name_tool and @loader_path to get an idea.
If you are using the deprecated XCode-project and embed the osg
frameworks into your app and the obj-plugin into plugins it should work
out of the box whithout fiddling around with install_name_tool.
Filip Wänström schrieb:
> I have problems with distributing self-contained applications on the
> mac. I have reduced my issues by building a very simple example that
> basically only opens a window and loads an .obj file.
> Using OSG_NOTIFY_LEVEL=INFO (DEBUG is the same + a lot more, but
> unrelated) I get the following output:
> [filip at MPQ]:[~/Documents/Code/OSGTests/]$
> GraphicsContext::setWindowingSystemInterface() 0xc0e930 0xa13c50
> Initiating ....
> Constructing BasicApp 1
> Listing plugins
> plugin: /Users/filip/Documents/Code/OSGTests/_CPack_Packages/Darwin/DragNDrop/BasicApp-1.0.0-Darwin/BasicApp.app/Contents/PlugIns/osgPlugins-2.9.6/osgdb_obj.so
> Found file: "data/models/clogo.obj"
> Opened DynamicLibrary osgPlugins-2.9.6/osgdb_obj.so
> Warning: Could not find plugin to read objects from file
> Failed to load model
> This seems self contradictory to me...
> So as far as I can tell:
> 1) the bundled osglibs are found correctly and the app starts
> 2) the file in the Resources directory in the app bundle is found correctly
> 3) the right plugin is chosen and found in the app bundle
> PlugIns/osgPlugins-2.9.6 directory
> 4) The lib is opened ok
> 5) it fails
> All .dylibs/.so are copied from my /usr/local/ osg install into the app bundle
> I tried to see if there were some hidden depencies on osgdb_obj.so
> using otool but as far as I could tell there were no extra Non-system
> I'm at a loss here and tearing my nonexistent hair. Any help would be
> greatly appreciated.
> osg-users mailing list
> osg-users at lists.openscenegraph.org
More information about the osg-users