About libstdc++ in 3rd part sdk and and libc++(c++ 0x) in cocos2dx 3.0

About libstdc++ in 3rd part sdk and and libc++(c++ 0x) in cocos2dx 3.0
0

#1

For some 3rd part sdk, such as 同步推 http://dev.tongbu.com/help/6.html and pp助手, is compiled with libstdc++ using some functions not include in libc++(c++ 0x), if we choose libc++ in xcode for cocos2dx 3.0, project is compiled with error:

Undefined symbols for architecture i386:
“std::ios_base::Init::Init()”, referenced from:
__GLOBAL__I_a in TBPlatform(UPPasswordTool.o)
“std::ios_base::Init::~Init()”, referenced from:
__GLOBAL__I_a in TBPlatform(UPPasswordTool.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)

Is there a way to handle this case? It’s hard for developer to ask all the 3rd part sdk providers to modify there sdk.


#2

Link Binary With Libraries

  • libstdc++.6.dylib (libstdc++.6.0.9.dylib is also OK)