The error happens with the default order. I tried changing it, with no success.

In case you want to look into this further, you may want to refer to
my version that successfully builds with the latest SDK and NDK and
with dynamic runtime: https://github.com/Eduardop/osg/tree/osg-android

Eduardo


On Sun, Oct 7, 2012 at 7:05 AM, Jorge Izquierdo Ciges <[email protected]> wrote:
> It could be possible that the gnustl_static was included in the wrong order,
> it has happened a few times (depending NDK/Linux version) to me.
>
> 2012/10/7 Eduardo Poyart <[email protected]>
>>
>> Finally, I was able to build by using the shared runtime
>> (libgnustl_shared). I could not make it work with libgnustl_static.
>>
>> Eduardo
>>
>>
>> On Fri, Oct 5, 2012 at 11:39 AM, Eduardo Poyart <[email protected]> wrote:
>> > Hello,
>> >
>> > I'm having a problem building for Android. I can build OSG, but when I
>> > try to build the GLES1 example I have these linker errors:
>> >
>> >
>> > /home/eduardo/src/osg/osg-android/obj/local/armeabi-v7a/libosgdb_osg.a(ReaderWri
>> > terOSG.o): In function `OSGReaderWriter::setPrecision(osgDB::Output&,
>> > osgDB::Opt
>> > ions const*) const':
>> >
>> > /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:295:
>> >  undefined reference to `std::basic_istringstream<char,
>> > std::char_traits<char>,
>> > std::allocator<char> >::basic_istringstream(std::basic_string<char,
>> > std::char_tr
>> > aits<char>, std::allocator<char> > const&, std::_Ios_Openmode)'
>> >
>> > /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313:
>> >  undefined reference to `std::basic_istringstream<char,
>> > std::char_traits<char>,
>> > std::allocator<char> >::~basic_istringstream()'
>> >
>> > /home/eduardo/src/osg/OpenSceneGraph/src/osgPlugins/osg/ReaderWriterOSG.cpp:313:
>> >  undefined reference to `std::basic_istringstream<char,
>> > std::char_traits<char>,
>> > std::allocator<char> >::~basic_istringstream()'
>> >
>> > There are several other errors related to basic_istringstream,
>> > basic_stringbuf, type_info and others.
>> >
>> > It seems like there is a STL incompatibility. I checked, but both osg
>> > and the example seem to be being built with the correct STL include
>> > path. The linker command is:
>> >
>> >
>> > /usr/local/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x
>> > 86/bin/arm-linux-androideabi-g++ -Wl,-soname,libosgNativeLib.so -shared
>> > --sysroo
>> > t=/usr/local/android-ndk-r8b/platforms/android-5/arch-arm
>> > ./obj/local/armeabi-v7
>> > a/objs/osgNativeLib/osgNativeLib.o
>> > ./obj/local/armeabi-v7a/objs/osgNativeLib/Osg
>> > MainApp.o
>> > ./obj/local/armeabi-v7a/objs/osgNativeLib/OsgAndroidNotifyHandler.o ./
>> > obj/local/armeabi-v7a/libgnustl_static.a  -Wl,--fix-cortex-a8 -L
>> > /home/eduardo/s
>> > rc/osg/osg-android/obj/local/armeabi-v7a -losgdb_tga -losgdb_osg
>> > -losgdb_depreca
>> > ted_osgviewer -losgdb_deprecated_osgvolume -losgdb_deprecated_osgtext
>> > -losgdb_de
>> > precated_osgterrain -losgdb_deprecated_osgsim
>> > -losgdb_deprecated_osgshadow -losg
>> > db_deprecated_osgparticle -losgdb_deprecated_osgfx
>> > -losgdb_deprecated_osganimati
>> > on -losgdb_deprecated_osg -losgdb_serializers_osgvolume
>> > -losgdb_serializers_osgt
>> > ext -losgdb_serializers_osgterrain -losgdb_serializers_osgsim
>> > -losgdb_serializer
>> > s_osgshadow -losgdb_serializers_osgparticle
>> > -losgdb_serializers_osgmanipulator -
>> > losgdb_serializers_osgfx -losgdb_serializers_osganimation
>> > -losgdb_serializers_os
>> > g -losgViewer -losgVolume -losgText -losgSim -losgManipulator -losgGA
>> > -losgFX -l
>> > osgDB -losgUtil -losg -lOpenThreads -Wl,--no-undefined
>> > -Wl,-z,noexecstack -Wl,-z
>> > ,relro -Wl,-z,now
>> > -L/usr/local/android-ndk-r8b/platforms/android-5/arch-arm/usr/
>> > lib -llog -lGLESv1_CM -ldl -lz -lc -lm -o
>> > obj/local/armeabi-v7a/libosgNativeLib.
>> > so
>> >
>> > I have the latest OSG SVN version and the latest SDK and NDK. I'm
>> > following the instructions in both
>> >
>> > http://www.openscenegraph.org/projects/osg/wiki/Support/PlatformSpecifics/Android
>> > and
>> > http://www.openscenegraph.com/index.php/documentation/platform-specifics/android/43-building-openscenegraph-for-android-3-0-2.
>> >
>> > I had to change a few "false" to "NULL" in osgNativeLib.cpp to stop
>> > gcc from complaining.
>> _______________________________________________
>> osg-users mailing list
>> [email protected]
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
>
>
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to