Error linking cocos2d-x while using NDK 6b and 7c

Hi!

I am trying to compile my project now but from one day to the other after changing the make files a bit I ended up with this mess:

Gdbserver : [arm-linux-androideabi-4.4.3] libs/armeabi/gdbserver
Gdbsetup : libs/armeabi/gdb.setup
SharedLibrary : libFacebookXTestProjectdebug.so
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCActionInterval.o): In function `std::priv::Vector_base<cocos2d::CCSpriteFrame, std::allocatorcocos2d::CCSpriteFrame* >::*M_throw_length_error() const’:
CCActionInterval.cpp:(.text.*ZNKSt4priv12_Vector_baseIPN7cocos2d13CCSpriteFrameESaIS3_EE21_M_throw_length_errorEv[std::priv::Vector_base<cocos2d::CCSpriteFrame, std::allocatorcocos2d::CCSpriteFrame* >::*M_throw_length_error const]+0xc): undefined reference to `std::**stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCNS.o): In function `std::priv::*String_base<char, std::allocator >::*M_throw_out_of_range() const’:
CCNS.cpp: const]*0xc): undefined reference to `std::*stl_throw_out_of_range‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCNS.o): In function `std::priv::*String_base<char, std::allocator >::*M_throw_length_error() const’:
CCNS.cpp: const]+0xc): undefined reference to `std::*stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCNS.o): In function `std::priv::*Vector_base<std::string, std::allocatorstd::string >::*M_throw_length_error() const’:
CCNS.cpp: const]*0xc):
undefined reference to `std::**stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCAutoreleasePool.o): In function `std::priv::Vector_base<cocos2d::CCObject, std::allocatorcocos2d::CCObject* >::*M_throw_length_error() const’:
C:/NVPACK/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: undefined reference to `std::**stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCAutoreleasePool.o): In function `std::priv::Vector_base<cocos2d::CCAutoreleasePool, std::allocatorcocos2d::CCAutoreleasePool* >::*M_throw_length_error() const’:
C:/NVPACK/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: undefined reference to `std::**stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCAutoreleasePool.o): In function `std::priv::Vector_base<cocos2d::CCAutoreleasePool, std::allocatorcocos2d::CCAutoreleasePool* >::*M_throw_out_of_range() const’:
C:/NVPACK/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.c:45: undefined reference to `std::stl_throw_out_of_range‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCDirector.o): In function `std::priv::Vector_base<cocos2d::CCScene, std::allocatorcocos2d::CCScene* >::*M_throw_length_error() const’:
CCDirector.cpp: const]*0xc): undefined reference to `std::*stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCKeypadDispatcher.o): In function `std::priv::Vector_base<cocos2d::CCKeypadHandler, std::allocatorcocos2d::CCKeypadHandler* >::*M_throw_length_error() const’:
C:/NVPACK/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: undefined reference to `std::*stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCLayer.o): In function `std::priv::Vector_base<cocos2d::CCLayer, std::allocatorcocos2d::CCLayer* >::*M_throw_length_error() const’:
CCLayer.cpp: const]0xc): undefined reference to `std::**stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCMenu.o): In function `std::priv::Vector_base<unsigned int, std::allocator >::M_throw_length_error() const’:
C:/NVPACK/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: undefined reference to `std::**stl_throw_length_error‘
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a(CCMenuItem.o): In function `std::priv::Vector_base<cocos2d::CCMenuItem, std::allocatorcocos2d::CCMenuItem* >::M_throw_length_error() const’:
CCMenuItem.cpp: const]+0xc): undefined reference to `std::**stl_throw_length_error’
d:/MyStuff/testengine-x/ExternalLibraries/Cocos2dx/Project/Android/obj/local/armeabi\libCocos2dxdebug.a:C:/NVPACK/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: more undefined references to `std::*stl_throw_length_error‘follow
d:/MyStuff/testengine-x/Gui/Project/Android/obj/local/armeabi\libGuidebug.a(ScrollMenu.o): In function `ScrollMenu’:
D:/MyStuff/testengine-x/Gui/Project/Android/jni/…/…/…/Source/ScrollMenu.cpp:59: undefined reference to `InputHandling::GestureRecognizer::GestureRecognizer‘
D:/MyStuff/testengine-x/Gui/Project/Android/jni/…/…/…/Source/ScrollMenu.cpp:59: undefined reference to `InputHandling::GestureRecognizer::GestureRecognizer()’
d:/MyStuff/testengine-x/Gui/Project/Android/obj/local/armeabi\libGuidebug.a: In function `ScrollMenu::ccTouchMoved’:
D:/MyStuff/testengine-x/Gui/Project/Android/jni/…/…/…/Source/ScrollMenu.cpp:465: undefined reference to `InputHandling::GestureRecognizer::startTouchPoint’
D:/MyStuff/testengine-x/Gui/Project/Android/jni/…/…/…/Source/ScrollMenu.cpp:467: undefined reference to `InputHandling::GestureRecognizer::endTouchPoint‘
D:/MyStuff/testengine-x/Gui/Project/Android/jni/…/…/…/Source/ScrollMenu.cpp:469: undefined reference to `InputHandling::GestureRecognizer::subPoint() const’
D:/MyStuff/testengine-x/Gui/Project/Android/jni/…/…/…/Source/ScrollMenu.cpp:474: undefined reference to `InputHandling::GestureRecognizer::swipeDirection const’
d:/MyStuff/testengine-x/baseLib/Project/Android/obj/local/armeabi\libBasedebug.a: In function `std::priv::Vector_base<baseLib::String, std::allocatorbaseLib::String >::M_throw_length_error const’:
C:/NVPACK/android-ndk-r6b/sources/cxx-stl/stlport/stlport/stl/_vector.c:41: undefined reference to `std::
_stl_throw_length_error(char const
)‘
collect2: ld returned 1 exit status
/cygdrive/c/NVPACK/android-ndk-r6b/build/core/build-binary.mk:286: recipe for target `/cygdrive/d/MyStuff/testengine-x/ExternalLibraries/Facebook/ProjectTest/Android/obj/local/armeabi/libFacebookXTestProjectdebug.so’ failed
make[1]:
* Error 1
make[1]: Leaving directory `/cygdrive/d/MyStuff/testengine-x/ExternalLibraries/Facebook/ProjectTest/Android’
d:/MyStuff/testengine-x/Make/Android/Makefile.rules:9: recipe for target `debug’ failed
make:
** [debug] Error 2

It seems that the error is something about stl.
Open Application.mk to check out what stl did you use.
You can refer to HelloWorld’s Application.mk.

Minggo Zhang wrote:

It seems that the error is something about stl.
Open Application.mk to check out what stl did you use.
You can refer to HelloWorld’s Application.mk.

i want to add stlport to cocos2dx but it complet error
i change Application.mk App_STL= gnustl_static to App_STL=stlport_shared
it show C:/cocos2d-2.0-rc2-x-2.0.1/cocos2dx/extensions/CCBReader/CCBReader.cpp:139:52: warning: multi-cha racter character constant
C:/cocos2d-2.0-rc2-x-2.0.1/cocos2dx/extensions/CCBReader/CCBReader.cpp: In static member function ’static cocos2d::CCString* cocos2d::extension::CCBReader::toLowerCase(cocos2d::CCString**)‘:
C:/cocos2d-2.0-rc2-x-2.0.1/cocos2dx/extensions/CCBReader/CCBReader.cpp:387: error:’::tolower’ ha s not been declared
/cygdrive/c/android-ndk-r7/build/core/build-binary.mk:241: recipe for target `obj/local/armeabi/o bjs-debug/cocos2dx_static/extensions/CCBReader/CCBReader.o’ failed
make:**** [obj/local/armeabi/objs-debug/cocos2dx_static/extensions/CCBReader/CCBReader.o] Error 1
make: 离开目录“/cygdrive/c/cocos2d-2.0-rc2-x-2.0.1/glogg/proj.android”

what’s worng i have not way to fix it!

Anyone solve this issue? I am compiling using gcc 4.7.2 (latest stable build).