On Tue, Sep 10, 2013 at 3:32 PM, Jorge Izquierdo Ciges <[email protected]> wrote: > So... 1rst -> OSG searches plugins without lib at the begin and they are > compiled with lib if my memory > is well enough.
You were right. I was able to build an APK with the plugin files (named osgdb_xx.so) but after deploying to the device itself all the plugin shared objects were no longer in /data/app-lib/org.some.app/ > I have OSG with shared libraries and plugins in Android but it is far from > submission because we > changed a lot of things and we are checking everything thrice, so don't > expect it soon. Do you have a public repo where you are testing this out? I suspect you're setting up a build similar to the static one where CMakeLists will do most of the magic. My build notes are here (still have to add some stuff, but its mostly complete: https://github.com/preet/scratch/wiki/OpenSceneGraph-on-Android) On Tue, Sep 10, 2013 at 6:10 PM, Raphael Grasset <[email protected]> wrote: > > Hi Preet, > > For the path prefix, not sure if it works, but look at > src/osgDB/Registry.cpp, and the function createLibraryNameForExtension, you > will see a: > std::string prepend = > std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/"); > > so if you create an empty string it may address your path issue. This set me on the right path to try an alternative once I realized I couldn't pack the default osgdb_xx.so plugins in with the APK libs. I used the osgPlugins CMake and set the TARGET_DEFAULT_PREFIX to "libosgdb_" (and modified createLibraryNameForExtension accordingly). Prefixing them with lib meant they actually showed up on the device when I deployed the APK... and I just ended up loading the plugins directly with the linker (ie i just explicitly linked against them when I built the app). Doing all that takes a lot of effort though... it's cleaner (from OSG's stand point) to save the plugins in internal storage and access them that way. The cost with that method is the plugins have to be packed and then extracted/installed during the application's first run. > Yet, it will be preferable that you build everything in static mode: what was > the reasons your static built didn't work? I was able to configure the build using CMake successfully, but calling make in the build directory fails with a bunch of 'undefined reference to' errors: I explained it briefly here: http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/2013-September/064587.html Regards, Preet _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

