我正在使用 Cocos2dx v2.2.2。在为 Android 使用“./build_native.sh”编译库时。我遇到了以下错误:
../android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/WSNode.o: in function WSNode::connect(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&):jni/../../Classes/WSNode.cpp:106: error: undefined reference to 'SocketIO::connect(SocketIO::SIODelegate&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
../android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/WSNode.o: in function WSNode::disconnect():jni/../../Classes/WSNode.cpp:119: error: undefined reference to 'SIOClient::disconnect()'
../android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/WSNode.o: in function WSNode::emitString(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >):jni/../../Classes/WSNode.cpp:130: error: undefined reference to 'SIOClient::emit(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::basic_string<char, std::char_traits<char>, std::allocator<char> >)'
../android-ndk-r9d/toolchains/arm-linux-androideabi-4.6/prebuilt/darwin-x86/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: ./obj/local/armeabi/objs/cocos2dcpp_shared/__/__/Classes/WSNode.o: in function WSNode::registerEvent(std::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::function<void (SIOClient*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>):jni/../../Classes/WSNode.cpp:135: error: undefined reference to 'SIOClient::on(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::function<void (SIOClient*, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)>)'
collect2: ld returned 1 exit status
make: *** [obj/local/armeabi/libcocos2dcpp.so] Error 1
make: Leaving directory `../cocos2d-x-2.2.2/projects/Cocos2dxProject/proj.android'
任何帮助将不胜感激。