Hi Christian, I've just uploaded a fix to osgAndroid to fix all the linkage problems with stl, I changed it to use the shared gnu stl library and inside the Java code I'm loading it before load the osg jni library.
I hope this fixes your problems, I've just made a quick test with osgsimple and it worked so far. Regards, Rafa. 2015-04-29 14:23 GMT+02:00 Christian Kehl <[email protected]>: > Hi, > > So, what I tried now is to revert to the old OpenSceneGraph. I was looking > up in the internet for the rand() error on the android platform, where > people say <cstdlib> needs to be explicitly included in the header that > uses the function. The stat64 error is an ample ifdef construct in > OpenSceneGraph/src/osgDB/FileUtils.cpp. I tried to add there the following > (osg svn version 3.3.3) > > > #if defined(GL_VERSION_ES_CM_1_0) || defined(GL_VERSION_ES_CM_1_1) || > defined(GL_VERSION_ES_2_0) || defined(GL_VERSION_ES_1_1) || > defined(GL_VERSION_ES_1_0) > // if we are on android,we need to obscure the 64-bit pointer > (needs to be adapted for android >=r10c > // due to 64 bit support) > #define stat64 stat > #endif > > (line 93, after the switch for _DARWIN_FEATURE_64_BIT_INODE) > > still, the work is unsuccessfull as I still get the same errors. > > christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$ > ${ANDROID_NDK}/ndk-build > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgViewer.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosg.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgDB.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgUtil.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgGA.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= JNIUtils.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= MultiViewNode.cpp > [armeabi] Compile++ thumb: jniosg-gles1 <= GLES2ShaderGenVisitor.cpp > [armeabi] SharedLibrary : libjniosg-gles1.so > /home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function > osgParticle::range<float>::get_random() const: error: undefined reference > to 'rand' > /home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(RadialShooter.cpp.o):RadialShooter.cpp:function > osgParticle::RadialShooter::shoot(osgParticle::Particle*) const: error: > undefined reference to 'rand' > /home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(RandomRateCounter.cpp.o):RandomRateCounter.cpp:function > osgParticle::RandomRateCounter::numParticlesToCreate(double) const: error: > undefined reference to 'rand' > /home/christian/android-install/lib/osgPlugins-3.3.3/libosgdb_serializers_osgparticle.a(SectorPlacer.cpp.o):SectorPlacer.cpp:function > osgParticle::SectorPlacer::place(osgParticle::Particle*) const: error: > undefined reference to 'rand' > /home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function > osgDB::fileType(std::string const&): error: undefined reference to 'stat64' > /home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function > osgDB::makeDirectory(std::string const&): error: undefined reference to > 'stat64' > /home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function > osgDB::makeDirectory(std::string const&): error: undefined reference to > 'stat64' > collect2: error: ld returned 1 exit status > make: *** [obj/local/armeabi/libjniosg-gles1.so] Error 1 > > > Thank you! > > Cheers, > Christian > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=63567#63567 > > > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > -- Rafael Gaitán Linares CTO at Mirage Technologies S.L - http://www.mirage-tech.com
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

