<div dir="ltr">Hi Christian,<div><br></div><div>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.</div><div><br></div><div>I hope this fixes your problems, I've just made a quick test with osgsimple and it worked so far.</div><div><br></div><div>Regards,</div><div>Rafa.</div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2015-04-29 14:23 GMT+02:00 Christian Kehl <span dir="ltr"><<a href="mailto:christian-kehl@web.de" target="_blank">christian-kehl@web.de</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
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)<br>
<br>
<br>
#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)<br>
// if we are on android,we need to obscure the 64-bit pointer (needs to be adapted for android >=r10c<br>
// due to 64 bit support)<br>
#define stat64 stat<br>
#endif<br>
<br>
(line 93, after the switch for _DARWIN_FEATURE_64_BIT_INODE)<br>
<br>
still, the work is unsuccessfull as I still get the same errors.<br>
<span class=""><br>
christian@PROMETHEUS:/media/christian/DATA/osgAndroid/org.openscenegraph.android$ ${ANDROID_NDK}/ndk-build<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgViewer.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosg.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgDB.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgUtil.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIosgGA.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= JNIUtils.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= MultiViewNode.cpp<br>
[armeabi] Compile++ thumb: jniosg-gles1 <= GLES2ShaderGenVisitor.cpp<br>
[armeabi] SharedLibrary : libjniosg-gles1.so<br>
</span>/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'<br>
/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'<br>
/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'<br>
/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'<br>
<span class="">/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function osgDB::fileType(std::string const&): error: undefined reference to 'stat64'<br>
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function osgDB::makeDirectory(std::string const&): error: undefined reference to 'stat64'<br>
/home/christian/android-install/lib/libosgDB.a(FileUtils.cpp.o):FileUtils.cpp:function osgDB::makeDirectory(std::string const&): error: undefined reference to 'stat64'<br>
</span><span class="">collect2: error: ld returned 1 exit status<br>
make: *** [obj/local/armeabi/libjniosg-gles1.so] Error 1<br>
<br>
<br>
</span><span class="">Thank you!<br>
<br>
Cheers,<br>
Christian<br>
<br>
------------------<br>
Read this topic online here:<br>
</span><a href="http://forum.openscenegraph.org/viewtopic.php?p=63567#63567" target="_blank">http://forum.openscenegraph.org/viewtopic.php?p=63567#63567</a><br>
<div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
<br>
_______________________________________________<br>
osg-users mailing list<br>
<a href="mailto:osg-users@lists.openscenegraph.org">osg-users@lists.openscenegraph.org</a><br>
<a href="http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org" target="_blank">http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org</a><br>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Rafael Gaitán Linares<br>CTO at Mirage Technologies S.L - <a href="http://www.mirage-tech.com" target="_blank">http://www.mirage-tech.com</a><br></div></div>
</div>