cocos2d-x icon indicating copy to clipboard operation
cocos2d-x copied to clipboard

Multiple definition of `__ctype_get_mb_cur_max'

Open krishan711 opened this issue 9 years ago • 4 comments

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 avatar Oct 23 '15 23:10 krishan711

@krishan711 Could you send a PR to resolve this issue? Thanks.

zilongshanren avatar Oct 26 '15 06:10 zilongshanren

@krishan711 how did you build for arm64-va8 since cocos2d-x doesn't provide corresponding 3rd party libs.

minggo avatar Jul 13 '16 09:07 minggo

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

TonyChenn avatar Apr 14 '22 06:04 TonyChenn

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

TonyChenn avatar Apr 14 '22 06:04 TonyChenn