啊塔

导航

Cocos2dX Android 编译出错

   在编译的时候老是出问题,真不知道是吭还是吭呢?一夜不眠的思考想到了一个问题可能是Application.mk的配置是不是有问题,在测试中证明了我的想法是正确的

  

jni/../../platform/android/PluginUtils.cpp:75: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:539: error: undefined reference to 'std::string::_Rep::_M_dispose(std::allocator<char> const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_pair.h:113: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_pair.h:119: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:539: error: undefined reference to 'std::string::_Rep::_M_dispose(std::allocator<char> const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:197: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:197: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_pair.h:96: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1131: error: undefined reference to 'std::string::assign(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1009: error: undefined reference to 'std::string::append(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1131: error: undefined reference to 'std::string::assign(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1009: error: undefined reference to 'std::string::append(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1131: error: undefined reference to 'std::string::assign(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1009: error: undefined reference to 'std::string::append(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
jni/../../platform/android/PluginProtocol.cpp:131: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
jni/../../platform/android/PluginProtocol.cpp:141: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
jni/../../platform/android/PluginProtocol.cpp:151: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:189: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_vector.h:1339: error: undefined reference to 'std::__throw_length_error(char const*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_vector.h:1339: error: undefined reference to 'std::__throw_length_error(char const*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_vector.h:1339: error: undefined reference to 'std::__throw_length_error(char const*)'
jni/../../platform/android/UserObject.cpp:10: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:197: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
jni/../../platform/android/AgentManager.cpp:62: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
jni/../../platform/android/AgentManager.cpp:63: error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::string const&, std::_Ios_Openmode)'
jni/../../platform/android/AgentManager.cpp:65: error: undefined reference to 'std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)'
jni/../../platform/android/AgentManager.cpp:67: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
jni/../../platform/android/AgentManager.cpp:69: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
jni/../../platform/android/AgentManager.cpp:67: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
jni/../../platform/android/AgentManager.cpp:65: error: undefined reference to 'std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/sstream:565: error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_ios.h:276: error: undefined reference to 'std::ios_base::~ios_base()'
jni/../../platform/android/AgentManager.cpp:104: error: undefined reference to 'VTT for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make.exe: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1

 

 

这里是采用anySdk打包工具

jni/hellocpp/PluginChannel.cpp:128: error: undefined reference to 'anysdk::framework::AgentManager::init(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >)'
jni/hellocpp/PluginChannel.cpp:423: error: undefined reference to 'anysdk::framework::PluginParam::PluginParam(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >)'
jni/hellocpp/Analytics.cpp:158: error: undefined reference to 'anysdk::framework::PluginParam::PluginParam(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >)'
jni/hellocpp/Analytics.cpp:177: error: undefined reference to 'anysdk::framework::PluginParam::PluginParam(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >)'
jni/hellocpp/Analytics.cpp:194: error: undefined reference to 'anysdk::framework::PluginParam::PluginParam(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > >, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > > > >)'
jni/../../platform/android/PluginFactory.cpp:57: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1009: error: undefined reference to 'std::string::append(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:539: error: undefined reference to 'std::string::_Rep::_M_dispose(std::allocator<char> const&)'
jni/../../platform/android/PluginJniHelper.cpp:222: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
jni/../../platform/android/PluginJniHelper.cpp:225: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:539: error: undefined reference to 'std::string::_Rep::_M_dispose(std::allocator<char> const&)'
jni/../../platform/android/PluginJniHelper.cpp:213: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
jni/../../platform/android/PluginJniHelper.cpp:218: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:270: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base const*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1131: error: undefined reference to 'std::string::assign(char const*, unsigned int)'
jni/../../platform/android/PluginUtils.cpp:75: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:539: error: undefined reference to 'std::string::_Rep::_M_dispose(std::allocator<char> const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_pair.h:113: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_pair.h:119: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:539: error: undefined reference to 'std::string::_Rep::_M_dispose(std::allocator<char> const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:197: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:197: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_pair.h:96: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1131: error: undefined reference to 'std::string::assign(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1009: error: undefined reference to 'std::string::append(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1131: error: undefined reference to 'std::string::assign(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1009: error: undefined reference to 'std::string::append(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1131: error: undefined reference to 'std::string::assign(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1009: error: undefined reference to 'std::string::append(char const*, unsigned int)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:547: error: undefined reference to 'std::string::assign(std::string const&)'
jni/../../platform/android/PluginProtocol.cpp:131: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
jni/../../platform/android/PluginProtocol.cpp:141: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
jni/../../platform/android/PluginProtocol.cpp:151: error: undefined reference to 'std::string::_Rep::_S_empty_rep_storage'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:189: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:204: error: undefined reference to 'std::_Rb_tree_decrement(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_vector.h:1339: error: undefined reference to 'std::__throw_length_error(char const*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_vector.h:1339: error: undefined reference to 'std::__throw_length_error(char const*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_vector.h:1339: error: undefined reference to 'std::__throw_length_error(char const*)'
jni/../../platform/android/UserObject.cpp:10: error: undefined reference to 'std::basic_string<char, std::char_traits<char>, std::allocator<char> >::~basic_string()'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:197: error: undefined reference to 'std::_Rb_tree_increment(std::_Rb_tree_node_base*)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
jni/../../platform/android/AgentManager.cpp:62: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
jni/../../platform/android/AgentManager.cpp:63: error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::basic_stringstream(std::string const&, std::_Ios_Openmode)'
jni/../../platform/android/AgentManager.cpp:65: error: undefined reference to 'std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)'
jni/../../platform/android/AgentManager.cpp:67: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
jni/../../platform/android/AgentManager.cpp:69: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
jni/../../platform/android/AgentManager.cpp:67: error: undefined reference to 'std::string::substr(unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:1864: error: undefined reference to 'std::string::find(char const*, unsigned int, unsigned int) const'
jni/../../platform/android/AgentManager.cpp:65: error: undefined reference to 'std::basic_istream<char, std::char_traits<char> >& std::getline<char, std::char_traits<char>, std::allocator<char> >(std::basic_istream<char, std::char_traits<char> >&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/sstream:565: error: undefined reference to 'std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >::~basic_stringstream()'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_ios.h:276: error: undefined reference to 'std::ios_base::~ios_base()'
jni/../../platform/android/AgentManager.cpp:104: error: undefined reference to 'VTT for std::basic_stringstream<char, std::char_traits<char>, std::allocator<char> >'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1743: error: undefined reference to 'std::_Rb_tree_rebalance_for_erase(std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/stl_tree.h:1025: error: undefined reference to 'std::_Rb_tree_insert_and_rebalance(bool, std::_Rb_tree_node_base*, std::_Rb_tree_node_base*, std::_Rb_tree_node_base&)'
/Users/daisy/Documents/software/anysdk/adt-bundle-mac-x86_64/android-ndk-r9d/sources/cxx-stl/gnu-libstdc++/4.8/include/bits/basic_string.h:2521: error: undefined reference to 'std::string::compare(char const*) const'
clang++.exe: error: linker command failed with exit code 1 (use -v to see invocation)
make.exe: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1

 

 

Application.mk

APP_STL := c++_static
NDK_TOOLCHAIN_VERSION=clang


APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char
APP_LDFLAGS := -latomic
APP_CFLAGS += -Wno-error=format-security

APP_DEBUG := $(strip $(NDK_DEBUG))
ifeq ($(APP_DEBUG),1)
  APP_CPPFLAGS += -DCOCOS2D_DEBUG=1
  APP_OPTIM := debug
else
  APP_CPPFLAGS += -DNDEBUG
  APP_OPTIM := release
endif

只需把上面红色部分改成 APP_STL := gnustl_static

 

posted on 2014-11-03 08:55  啊塔  阅读(2674)  评论(0编辑  收藏  举报