[osg-users] osgAndroid - Deploying and Debugging
Akhtar Shamim
shamimz at gmail.com
Wed Sep 30 03:23:28 PDT 2015
Hi
Just an update.
I managed to make osgAndroidExampleGLES1 work based on the Android.mk
settings for osgSimple and am able to load cessna.osg or any other osg
models. However, i am still not able to make osgSimple work based on the
predefined setting.
If anyone is interested then I can provide a complete step by step guide
for making osgAndroid compile and run the osgAndroidExampleGLES1 example on
an Android device (with development environment on both Windows 10 and
Ubuntu 14.0.4)
regards
Shamim
On Tue, Sep 29, 2015 at 3:12 PM, Akhtar Shamim <shamimz at gmail.com> wrote:
> Hi Rafa
>
> Thank you for the pointer. I managed to compile and run the application in
> an Android device successfully.
> I have also managed to compile and run the osgAndroidExampleGLES1 on my
> mobile device. I can see the blue background for the example together with
> three buttons.
>
> However, now when i try to load a model (cessna.osg) it shows error:
> dlopen failed: library osgPlugins-3.4.0/osgdb_osg.so" not found.
> DynamicLibrary::failed loading "osgPlugins-3.4.0/osgdb_osg.so". It is
> strange because the build is static build yet it is looking for .so file.
>
> I am not too sure why this is happening. Any pointer will be very helpful.
>
> regards
> Shamim
>
>
> On Mon, Sep 28, 2015 at 5:08 PM, Rafa Gaitan <rafa.gaitan at gmail.com>
> wrote:
>
>> Hi Shamim,
>>
>> I added glustl_shared to be loaded dynamically before loading any
>> osgAndroid jni library, because linking it statically was giving a lot of
>> problems.
>>
>> I don't recall having problems before, but I usually work on linux or mac
>> when I have to develop in android and OSG. Maybe is something related to
>> the r10e NDK?.
>>
>> Anyway, could you check if you have in your
>> org.openscenegraph.android/libs/armeabi/ the library libgnustd_shared.so?,
>> if not, probably you need to copy it there from the NDK.
>>
>> I don't recall if I copied it by myself that or it's automated somehow by
>> the NDK build system. But if you have it there along the libjni-osggles*.so
>> libraries it will be deployed within the apk.
>>
>> Regards,
>> Rafa.
>>
>>
>> El lun., 28 sept. 2015 a las 9:34, Akhtar Shamim (<shamimz at gmail.com>)
>> escribió:
>>
>>> Hi
>>>
>>> Recently we had a requirement to build OSG for Android and load a
>>> OpenFlight MetaFight file. This is what I did:
>>>
>>> - Checkout the 3.4.0 stable release of OSG
>>> - Installed Android NDK, SDK and Eclipse.
>>> - Used the toolchain to compile OSG for GLES1
>>> - Downloaded OSGAndroid from GitHub
>>> - Imported to Eclipse
>>> - Build all the four projects
>>>
>>> So far there is no problem at all. Everything went smooth.
>>>
>>> However, when I am trying to deploy the osgsimple application using
>>> eclipse or trying to debug the application it throws an error saying:
>>>
>>> "Couldn't load gnustl_shared from loader dalvik.system.PathClassLoader".
>>>
>>> This is what I did:
>>> - Modified Android.mk to have the correct OSG_SDK path
>>> - Modified Android.mk to have the correct plugins (osgPlugins-3.4.0)
>>>
>>> Note:
>>>
>>> (a) No other changes made to any files downloaded from GitHub for
>>> osgAndroid.
>>> (b) The command used to configure cmake is <<<
>>>
>>> > set ANDROID_NDK=C:\Android\android-ndk-r10e
>>> > "c:\Program Files (x86)\CMake 2.8\bin\cmake.exe" .. -G"MinGW
>>> Makefiles" -DANDROID_NDK=C:/Android/android-ndk-r10e
>>> -DCMAKE_TOOLCHAIN_FILE=../PlatformSpecifics/Android/android.toolchain.cmake
>>> -DCMAKE_MAKE_PROGRAM="%ANDROID_NDK%\prebuilt\windows-x86_64\bin\make.exe"
>>> -DOPENGL_PROFILE="GLES1" -DDYNAMIC_OPENTHREADS=OFF
>>> -DDYNAMIC_OPENSCENEGRAPH=OFF -DANDROID_NATIVE_API_LEVEL=15
>>> -DANDROID_ABI=armeabi -DCMAKE_INSTALL_PREFIX=C:/Android/OSG_ES1-3.4.0
>>>
>>> > make -j 8
>>> > make install
>>>
>>> >>>>
>>>
>>> I tried the above in Windows 10.
>>>
>>> Any help to get this resolved will be greatly appreciated.
>>>
>>> regards
>>> Shamim
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> osg-users mailing list
>>> osg-users at lists.openscenegraph.org
>>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>>
>>
>> _______________________________________________
>> osg-users mailing list
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150930/6ea954e9/attachment-0003.htm>
More information about the osg-users
mailing list