|
发表于 2012-2-16 13:14:52
|
显示全部楼层
本帖最后由 accesswang 于 2012-2-16 13:22 编辑
ylwang1master 发表于 2012-2-15 20:06
我所使用的软件版本:
osg-3.0.0
android-ndk-r6-crytax-2
To androidwby & ylwang1master :
OSG和osgAndroidExampleGLES1编译成功,但在模拟器里运行出现了下面的问题,应该是加载libosgNativeLib.so库时出问题的.不知道是不是编译联接的库和模拟器下的库不一致.你们还遇到类似问题了?
编译和运行环境:
gentoo
android-ndk-r7
OpenSceneGraph-3.0.0
编译osgAndroidExampleGLES1,只是在Android.mk增加了-L/work/android-ndk-r7/sources/cxx-stl/gnu-libstdc++/libs/armeabi
另外配置了环境变量export ANDROID_NDK=/work/android-ndk-r7,其他没做任何修改.
osgAndroidExampleGLES1就是在OpenSceneGraph-3.0.0/examples目录下的.
android-sdk 4.0/2.3.3
///
运行后出现下面问题:
02-16 12:56:34.666: D/libEGL(5755): Emulator without GPU support detected. Fallback to software renderer.
02-16 12:56:34.676: D/libEGL(5755): loaded /system/lib/egl/libGLES_android.so
02-16 12:56:34.727: W/EGLview(5755): creating OpenGL ES 1 context
02-16 12:56:34.746: D/gralloc_goldfish(5755): Emulator without GPU emulation detected.
02-16 12:56:34.757: D/dalvikvm(5755): Trying to load lib /mnt/asec/osg.AndroidExample-1/lib/libosgNativeLib.so 0x41058fe0
02-16 12:56:34.767: W/dalvikvm(5755): Exception Ljava/lang/UnsatisfiedLinkError; thrown while initializing Losg/AndroidExample/osgNativeLib;
02-16 12:56:34.776: W/dalvikvm(5755): threadid=11: thread exiting with uncaught exception (group=0x409951f8)
02-16 12:56:34.786: E/AndroidRuntime(5755): FATAL EXCEPTION: GLThread 135
02-16 12:56:34.786: E/AndroidRuntime(5755): java.lang.ExceptionInInitializerError
02-16 12:56:34.786: E/AndroidRuntime(5755): at osg.AndroidExample.EGLview$Renderer.onSurfaceChanged(EGLview.java:319)
02-16 12:56:34.786: E/AndroidRuntime(5755): at android.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1428)
02-16 12:56:34.786: E/AndroidRuntime(5755): at android.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1189)
02-16 12:56:34.786: E/AndroidRuntime(5755): Caused by: java.lang.UnsatisfiedLinkError: Cannot load library: reloc_library[1285]: 35 cannot locate '_ZTv0_n12_NSt19basic_istringstreamIcSt11char_traitsIcESaIcEED1Ev'...02-16 12:56:34.786: E/AndroidRuntime(5755): at java.lang.Runtime.loadLibrary(Runtime.java:370)
02-16 12:56:34.786: E/AndroidRuntime(5755): at java.lang.System.loadLibrary(System.java:535)
02-16 12:56:34.786: E/AndroidRuntime(5755): at osg.AndroidExample.osgNativeLib.<clinit>(osgNativeLib.java:6)
02-16 12:56:34.786: E/AndroidRuntime(5755): ... 3 more |
|