cocos2d-x
cocos2d-x copied to clipboard
Multiple definition of `__ctype_get_mb_cur_max'
When building for arm64-v8a I get the error "multiple definition of `__ctype_get_mb_cur_max'" during the "install" phase of building for android. The definitions are in: CCApplication-android.cpp:45 CCEnhanceAPI-android.cpp:35
Removing the repeated definition from CCEnhanceAPI-android.cpp seems to fix it for me.
@krishan711 Could you send a PR to resolve this issue? Thanks.
@krishan711 how did you build for arm64-va8 since cocos2d-x doesn't provide corresponding 3rd party libs.
I also have the same problem.
CCEnhanceAPI-android.cpp:34: multiple definition of `__ctype_get_mb_cur_max' CCApplication-android.cpp:44: first defined here
I delete these in CCEnhanceAPI-android.cpp and solved the problem.
// FIXME: using ndk-r10c will cause the next function could not be found. It may be a bug of ndk-r10c.
// Here is the workaround method to fix the problem.
//#ifdef __aarch64__
//extern "C" size_t __ctype_get_mb_cur_max(void) {
// return (size_t) sizeof(wchar_t);
//}
//#endif