查看: 2385|回复: 1

android ndk9编译osg的问题

[复制链接]

该用户从未签到

发表于 2014-8-9 18:04:48 | 显示全部楼层 |阅读模式
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function osgDB::ReaderWriter:penArchive(std::string const&, osgDB::ReaderWriter::ArchiveStatus, unsigned int, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/include/osgDB/ReaderWriter:216: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function osgDB::ReaderWriter::openArchive(std::istream&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/include/osgDB/ReaderWriter:219: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function osgDB::ReaderWriter::readHeightField(std::string const&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/include/osgDB/ReaderWriter:223: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function osgDB::ReaderWriter::readNode(std::string const&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/include/osgDB/ReaderWriter:224: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function ReaderWriterDDS::writeImage(osg::Image const&, std::string const&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/src/osgPlugins/dds/ReaderWriterDDS.cpp:1445: error: undefined reference to 'std::basic_ofstream<char, std::char_traits<char> >::close()'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function ReaderWriterDDS::writeImage(osg::Image const&, std::string const&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/include/osgDB/ReaderWriter:168: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function ReaderWriterDDS::writeImage(osg::Image const&, std::string const&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/src/osgPlugins/dds/ReaderWriterDDS.cpp:1448: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function ReaderWriterDDS::writeImage(osg::Image const&, std::string const&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/include/osgDB/ReaderWriter:168: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function ReaderWriterDDS::writeImage(osg::Image const&, std::string const&, osgDB::Options const*) const:G:/OpenSceneGraph-3.2.1-rc3/src/osgPlugins/dds/ReaderWriterDDS.cpp:1448: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function osg::Object::setName(std::string const&):E:/android/android-ndk-r9-windows-x86/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/include/bits/basic_string.h:542: error: undefined reference to 'std::string::assign(std::string const&)'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function std::_Vector_base<unsigned int, std::allocator<unsigned int> >::_M_allocate(unsigned int) [clone .isra.73]:E:/android/android-ndk-r9-windows-x86/android-ndk-r9/sources/cxx-stl/gnu-libstdc++/4.6/include/ext/new_allocator.h:90: error: undefined reference to 'std::__throw_bad_alloc()'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function WriteDDSFile(osg::Image const*, std::ostream&, bool):G:/OpenSceneGraph-3.2.1-rc3/src/osgPlugins/dds/ReaderWriterDDS.cpp:1239: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function WriteDDSFile(osg::Image const*, std::ostream&, bool):G:/OpenSceneGraph-3.2.1-rc3/src/osgPlugins/dds/ReaderWriterDDS.cpp:1246: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'
E:/android/android-ndk-r9-windows-x86/android-ndk-r9/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld.exe: G:/cygwin/usr/local/obj/local/armeabi/libosgdb_dds.a(ReaderWriterDDS.o): in function WriteDDSFile(osg::Image const*, std::ostream&, bool):G:/OpenSceneGraph-3.2.1-rc3/src/osgPlugins/dds/ReaderWriterDDS.cpp:1259: error: undefined reference to 'std::basic_ostream<char, std::char_traits<char> >& std::operator<< <std::char_traits<char> >(std::basic_ostream<char, std::char_traits<char> >&, char const*)'


传不了图片,只能这么看了,望大神们见谅

该用户从未签到

 楼主| 发表于 2014-8-9 21:00:23 | 显示全部楼层
问题解决了,是stl的问题,在Android.mk中加入$(NDK_ROOT)/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/libgnustl_static.a,不能加-lgnustl_static
您需要登录后才可以回帖 登录 | 注册

本版积分规则

OSG中国官方论坛-有您OSG在中国才更好

网站简介:osgChina是国内首个三维相关技术开源社区,旨在为国内更多的技术开发人员提供最前沿的技术资讯,为更多的三维从业者提供一个学习、交流的技术平台。

联系我们

  • 工作时间:09:00--18:00
  • 反馈邮箱:1315785073@qq.com
快速回复 返回顶部 返回列表