在編譯cocos2d-x的helloworld 或者 tests的時候。
官網上使用ndk4、ndk5,這里是使用 ndkr7b、ndkr8或ndkr8b 。操作會簡單很多,但是出了些小問題也是很坑人的。
下面出現如下編譯錯誤
- Prebuilt : libgnustl_static.a <= <NDK>/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi/
- SharedLibrary : libcocos2d.so
- g:/handgame/tools/android-ndk-r8b/toolchains/arm-linux-androideabi-4.6/prebuilt/
- windows/bin/../lib/gcc/arm-linux-androideabi/4.6.x-google/../../../../arm-linux-
- androideabi/bin/ld.exe: cannot find ./obj/local/armeabi/libgnustl_static.a:
- Permission denied
- collect2: ld returned 1 exit status
- /cygdrive/g/HandGame/tools/android-ndk-r8b/build/core/build-binary.mk:378:
- recipe for target `obj/local/armeabi/libcocos2d.so' failed
在helloworld中找到Application.mk文件添加如下內容:STLPORT_FORCE_REBUILD := true