[osg-users] Android osgPlugins

Christian Kehl Christian.Kehl at uni.no
Wed Apr 15 07:29:32 PDT 2015


Jan Ciger <jan.ciger at ...> writes:

> 
> 
> 
> On Mon, Apr 13, 2015 at 11:16 AM, Christian Kehl <Christian.Kehl <at>
uni.no> wrote:Hi Jordi,
> I encounter the same problem in the same situation. I've build OSG for
> Android in static mode (only way it even compiles), all static libraries
> (for me: .a-files) are in my local installation folder, together with the
> libraries for armeabi and armeabi-v7a from the Android Native Developer Kit.
> It compiles fine, I can change the background of the viewer without
> problems, but it just doesn't wanna load the models. I get the same logcat
> messages as mentioned before (not finding the plugins). I, up until now,
> loaded files from the internal HDD of the phone (I am on Nexus 5), but today
> also try out the sdcard as source. Are there any suggestions how to solve
> the problem ?
> 
> 
> 
> 
> Did you:
> 
> a) Link the plugins into your JNI code? This is needed because the
libraries are static, thus it cannot load them dynamically at runtime. It is
a workaround for complicated deployment on Android. 
> 

> 
> Without this sort of declaration and the corresponding linking statement
it will not work when built as a fully static library. 
> 
> J.

I also append the output of the ndk-build, in case this may give some
indication what goes wrong there ...

christian at PROMETHEUS:~/workspace/Android/osgViewer2$ ${ANDROID_NDK}/ndk-build
Android NDK: WARNING:jni/Android.mk:osgNativeLib: non-system libraries in
linker flags: -lgnustl_static -lcurl -ljpeg -lgif -lpng -ltiff -losgdb_dds
-losgdb_openflight -losgdb_tga -losgdb_rgb -losgdb_osgterrain -losgdb_osg
-losgdb_ive -losgdb_deprecated_osgviewer -losgdb_deprecated_osgvolume
-losgdb_deprecated_osgtext -losgdb_deprecated_osgterrain
-losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow
-losgdb_deprecated_osgparticle -losgdb_deprecated_osgfx
-losgdb_deprecated_osganimation -losgdb_deprecated_osg
-losgdb_serializers_osgvolume -losgdb_serializers_osgtext
-losgdb_serializers_osgterrain -losgdb_serializers_osgsim
-losgdb_serializers_osgshadow -losgdb_serializers_osgparticle
-losgdb_serializers_osgmanipulator -losgdb_serializers_osgfx
-losgdb_serializers_osganimation -losgdb_serializers_osg -losgViewer
-losgVolume -losgTerrain -losgText -losgShadow -losgSim -losgParticle
-losgManipulator -losgGA -losgFX -losgDB -losgAnimation -losgUtil -losg
-lOpenThreads    
Android NDK:     This is likely to result in incorrect builds. Try using
LOCAL_STATIC_LIBRARIES    
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library
dependencies of the    
Android NDK:     current module    
Android NDK: WARNING:jni/Android.mk:osgNativeLib: non-system libraries in
linker flags: -lgnustl_static -lcurl -ljpeg -lgif -lpng -ltiff -losgdb_dds
-losgdb_openflight -losgdb_tga -losgdb_rgb -losgdb_osgterrain -losgdb_osg
-losgdb_ive -losgdb_deprecated_osgviewer -losgdb_deprecated_osgvolume
-losgdb_deprecated_osgtext -losgdb_deprecated_osgterrain
-losgdb_deprecated_osgsim -losgdb_deprecated_osgshadow
-losgdb_deprecated_osgparticle -losgdb_deprecated_osgfx
-losgdb_deprecated_osganimation -losgdb_deprecated_osg
-losgdb_serializers_osgvolume -losgdb_serializers_osgtext
-losgdb_serializers_osgterrain -losgdb_serializers_osgsim
-losgdb_serializers_osgshadow -losgdb_serializers_osgparticle
-losgdb_serializers_osgmanipulator -losgdb_serializers_osgfx
-losgdb_serializers_osganimation -losgdb_serializers_osg -losgViewer
-losgVolume -losgTerrain -losgText -losgShadow -losgSim -losgParticle
-losgManipulator -losgGA -losgFX -losgDB -losgAnimation -losgUtil -losg
-lOpenThreads    
Android NDK:     This is likely to result in incorrect builds. Try using
LOCAL_STATIC_LIBRARIES    
Android NDK:     or LOCAL_SHARED_LIBRARIES instead to list the library
dependencies of the    
Android NDK:     current module    
[armeabi] Compile++ thumb: osgNativeLib <= osgNativeLib.cpp
[armeabi] Compile++ thumb: osgNativeLib <= OsgMainApp.cpp
[armeabi] Compile++ thumb: osgNativeLib <= OsgAndroidNotifyHandler.cpp
[armeabi] SharedLibrary  : libosgNativeLib.so
[armeabi] Install        : libosgNativeLib.so => libs/armeabi/libosgNativeLib.so
[armeabi-v7a] Compile++ thumb: osgNativeLib <= osgNativeLib.cpp
[armeabi-v7a] Compile++ thumb: osgNativeLib <= OsgMainApp.cpp
[armeabi-v7a] Compile++ thumb: osgNativeLib <= OsgAndroidNotifyHandler.cpp
[armeabi-v7a] SharedLibrary  : libosgNativeLib.so
[armeabi-v7a] Install        : libosgNativeLib.so =>
libs/armeabi-v7a/libosgNativeLib.so







More information about the osg-users mailing list