Ahh..  that is a great solution.  I like the idea of adding a path inside the application packaging also.  That would probably be a good idea for my app with all the platforms we am supporting.

Thanks for the information and quick response.

Steve



Ross Anderson <[EMAIL PROTECTED]>
Sent by: [EMAIL PROTECTED]

09/22/2006 10:46 AM

Please respond to
osg users <[email protected]>

To
osg users <[email protected]>
cc
Subject
Re: [osg-users] osgPlugins not found on OS X





I've noticed a similar problem. The /Library/... path is not set by default.

I have solved this problem by putting the following near the top of main():

#ifdef __APPLE__
    osgDB::FilePathList    pluginPaths;
    pluginPaths.push_back( "/Library/Application Support/OpenSceneGraph/PlugIns" );
osgDB::Registry::instance()->setLibraryFilePathList( pluginPaths );
#endif

I'm using a file list because I also push another path to inside my application package (not shown here), so that I can have a copy of the OSG Frameworks and Plug Ins bundled internally (allowing drag-and-drop installs of the software).

---------------
Ross Anderson
[EMAIL PROTECTED]
Group 106 - Active Optical Systems
MIT Lincoln Laboratory
(781) 981-3344



On Sep 22, 2006, at 12:28 PM, Steven R Woolsey wrote:


I am working on a program using osg and have it compiling under Windows, Linux, and OS X.  It works great under windows.  I just started working on the OS X version.  I get the program compiled with osg, but when I run the program, it cannot find any of the plugins and exits.  I need to load an obj file, a 3ds file, and a number of textures.  It always tells me it cannot find the plugin.  I have tried the framework version of the binaries of osg available on the site, as well as compiling the osg from scratch using gcc.


With the framework version I placed the Frameworks in "/Library/Frameworks" and PlugIns in "/Library/Application Support/OpenSceneGraph/PlugIns".  This failed to find the plugins the same way as when I compiled myself.


I am also unable to get the osg example programs to find any plugins.  


I am using osg 1.2, and this would be from a terminal window.  I have set my LD_LIBRARY_PATH to "/usr/local/lib:/usr/local/lib/osgPlugins".  My path is set to "/usr/local/share/OpenSceneGraph/bin".


I have tried this on both a G5 and an Intel based Powerbook with the same results.  I must be missing something.  I am not that familiar with OS X, so forgive my ignorance if this is an easy fix.


Any suggestions would be greatly appreciated.


Thanks,


Steve Woolsey

<mime-attachment.jpeg>
<mime-attachment.jpeg>
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/
_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

_______________________________________________
osg-users mailing list
[email protected]
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to