I'm having issues trying to get OSG to load plugins on Android for a shared
library build... though OSG seems to be working fine on Android as a shared
lib without plugins which is great!

I can't seem to create an osgPlugins directory where OSG ends up being
deployed in the application package so I just want OSG to load plugins from
the directory where the rest of the shared objects live on Android:

/data/app-lib/org.some.app/    <--- where all the *.so libraries live,
including osgdb_xx.so

So I do this:
osgDB::Registry::instance()->setLibraryFilePathList("/data/app-lib/org.some.app");

But it seems like its prefixing 'osgPlugins-3.3.0' to its search path. This
is the output I get from OSG:

"Warning: dynamic library 'osgPlugins-3.3.0/osgdb_png.so' does not exist
(or isn't readable):"
"Cannot load library: load_library(linker.cpp:745): library
"osgPlugins-3.3.0/osgdb_png.so" not found"
"DynamicLibrary::failed loading "osgPlugins-3.3.0/osgdb_png.so""

Is there something else I need to do to specify the path where it should
search?

Is there a way to avoid creating an osgPlugins folder altogether as a build
option and just have it look for the plugins without prefixing anything to
their path?

I ran across this problem when using OSG for another platform as well and
worked around it using a few tricks but Android is much less tolerant in
this regard.


Preet
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to