|
我的osg版本是3.0.1,NDK版本是android-ndk-r8,我按照网上的方法在cygwin下用cmake将osg编译成功,但当我用eclipse+cdt+NDK编译例子程序时出现很多错误,好像是关于stl的错误,在网上查说是把将application.mk的APP_STL改了就行,可是我把所有能用的几个值都试了还是不行,请教各位高手我该怎么做,错误如下所示,只贴一部分,其实有一大堆类似的- D:/android/android-ndk-r8/sources/cxx-stl/gnu-libstdc++/include/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o): In function `_Vector_base':
- D:/android/android-ndk-r8/sources/cxx-stl/gnu-libstdc++/include/bits/stl_vector.h:115: undefined reference to `__cxa_end_cleanup'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o):(.ARM.extab.text._ZNSt6vectorIN3osg4View5SlaveESaIS2_EEC1ERKS4_[std::vector<osg::View::Slave, std::allocator<osg::View::Slave> >::vector(std::vector<osg::View::Slave, std::allocator<osg::View::Slave> > const&)]+0x0): undefined reference to `__gxx_personality_v0'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o): In function `~ref_ptr':
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/include/osg/ref_ptr:35: undefined reference to `__cxa_end_cleanup'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o):(.ARM.extab.text._ZN3osg4ViewC2ERKS0_RKNS_6CopyOpE+0x0): undefined reference to `__gxx_personality_v0'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o): In function `View':
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/src/osg/View.cpp:50: undefined reference to `__cxa_end_cleanup'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o):(.ARM.extab.text._ZN3osg4ViewC1ERKS0_RKNS_6CopyOpE+0x0): undefined reference to `__gxx_personality_v0'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o): In function `std::_Vector_base<osg::View::Slave, std::allocator<osg::View::Slave> >::_M_allocate(unsigned int)':
- D:/android/android-ndk-r8/sources/cxx-stl/gnu-libstdc++/include/ext/new_allocator.h:87: undefined reference to `std::__throw_bad_alloc()'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o): In function `osg::View::setLightingMode(osg::View::LightingMode)':
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/src/osg/View.cpp:116: undefined reference to `__cxa_end_cleanup'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o):(.ARM.extab.text._ZN3osg4View15setLightingModeENS0_12LightingModeE+0x0): undefined reference to `__gxx_personality_v0'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o): In function `~ref_ptr':
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/include/osg/ref_ptr:35: undefined reference to `__cxa_end_cleanup'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o):(.ARM.extab.text._ZN3osg4ViewC2Ev+0x0): undefined reference to `__gxx_personality_v0'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/build/obj/local/armeabi\libosg.a(View.o): In function `View':
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/src/osg/View.cpp:41: undefined reference to `__cxa_end_cleanup'
- D:/OSGEarthVS/OpenSceneGraph-3.0.1/src/osg/View.cpp:41: undefined reference to `std::string::_Rep::_S_empty_rep_storage'
复制代码 |
|