[解决]ndkr10编译 出现clang++.exe error linker 有大神遇到吗,无法链接

错误信息如下,求解释 我用的是ndkr10
D:\xiaoyao>cocos compile -p android
Running command: compile
Building mode: debug
building native
NDK build mode: debug
The Selected NDK toolchain version was 4.8 !
running: ‘C:\android-ndk-r9b\ndk-build -C D:\xiaoyao\frameworks\runtime-src\proj
.android -j1 NDK_MODULE_PATH=D:\xiaoyao\frameworks\runtime-src\proj.android…/.
./cocos2d-x;D:\xiaoyao\frameworks\runtime-src\proj.android…/…/cocos2d-x/cocos
/;D:\xiaoyao\frameworks\runtime-src\proj.android…/…/cocos2d-x/external;D:\xia
oyao\frameworks\runtime-src\proj.android…/…/cocos2d-x/cocos/scripting NDK_DEB
UG=1’

Android NDK: WARNING:D:\xiaoyao\frameworks\runtime-src\proj.android…/…/cocos2
d-x/cocos//./Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for stat
ic libraries
Android NDK: WARNING:D:\xiaoyao\frameworks\runtime-src\proj.android…/…/cocos2
d-x/cocos//platform/android/Android.mk:cocos2dxandroid_static: LOCAL_LDLIBS is a
lways ignored for static libraries
make.exe: Entering directory D:/xiaoyao/frameworks/runtime-src/proj.android' StaticLibrary : liblua.a StaticLibrary : libnetwork.a StaticLibrary : libcocosbuilder.a StaticLibrary : libcocostudio.a StaticLibrary : libspine.a StaticLibrary : libui.a StaticLibrary : libextension.a StaticLibrary : libcocos2d.a StaticLibrary : libcocosdenshion.a StaticLibrary : libbox2d.a StaticLibrary : libchipmunk.a StaticLibrary : libcocos2dandroid.a StaticLibrary : libcpufeatures.a SharedLibrary : libcocos2dlua.so C:/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc /arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: error: C:/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc /arm-linux-androideabi/4.8/libgcc.a(pr-support.o): multiple definition of '_Unwi nd_GetRegionStart' C:/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc /arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: C:/andr oid-ndk-r9b/sources/cxx-stl/llvm-libc++/libs/armeabi/thumb/libc++_static.a(Unwin d-EHABI.o): previous definition here C:/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc /arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: error: C:/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc /arm-linux-androideabi/4.8/libgcc.a(pr-support.o): multiple definition of '_Unwi nd_GetLanguageSpecificData' C:/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/windows/lib/gcc /arm-linux-androideabi/4.8/../../../../arm-linux-androideabi/bin\ld.exe: C:/andr oid-ndk-r9b/sources/cxx-stl/llvm-libc++/libs/armeabi/thumb/libc++_static.a(Unwin d-EHABI.o): previous definition here clang++.exe: error: linker command failed with exit code 1 (use -v to see invoca tion) make.exe: *** Error 1 make.exe: Leaving directory D://frameworks/runtime-src/proj.android’
Error running command, return code: 2

虽然没看懂错误,不过建议换成ndk9试试。

楼主,请先换成ndk r9d,保证编译通过
ndk r10是最近新出的,今天引擎团队正在解决r10上面编译不通过的问题。

看你的环境应该是低于NDK r9d。
请使用NDK r9d。
NDK r10暂不支持,正在解决。

果然是NDK版本问题 换9dOK了 谢谢各位

头疼了一晚
终于查到正确解决方案
睡觉

我是ndk吧的吧主,更多的ndk的问题,欢迎大家到ndk吧来反馈,谢谢!

我用的就是ndk9b但还是出现这个错误

ndk9d也一样