On Jan 7, 2012, at 5:35 PM, Terry Welsh wrote: > I want to search for plugins in . first. My first attempt was to set > OSG_LIBRARY_PATH=. Unfortunately, OSG_LIBRARY_PATH just appends the > standard search paths: > /usr/lib/:/usr/lib64/:/usr/local/lib/:/usr/local/lib64/ > > Next I tried setting it in code with > Registry::instance()->setLibraryFilePathList("./:/usr/local/lib/"); > This almost works except that my search order becomes: > ./osgPlugins-3.1.0 > /usr/local/lib/osgPlugins-3.1.0 > ./ > /usr/local/lib/ > > This means that the library from the standard directory gets called first. > > So I tried Registry::instance()->setLibraryFilePathList("./"); And > this works. However, when you set your library file path list in the > code this way, OSG_LIBRARY_PATH no longer has any effect. So I have > made my program look where I want for plugins, but I lose all > flexibility to experiment with OSG_LIBRARY_PATH. > > Is there any way to do both, search first in . and still have the > flexibility of using OSG_LIBRARY_PATH?
Could you get the OSG_LIBRARY_PATH env variable and append it to . and then set Registry::instance()->setLibraryFilePathList( wholeLibraryPath ); ? Doug _______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org