Cocos2d-x v3.12编译失败

时间:2016-07-10 10:46:04

标签: android clang cocos2d-x game-engine

最近更新了Cocos2d-x到v 3.12并创建了“Hello World!”项目但CLI命令失败,如下所示记录:

make: Entering directory `/home/..../proj.android'
[armeabi] StaticLibrary  : libcocos2d.a
[armeabi] Compile++ thumb: cocostudio_static <= WidgetReader.cpp
/home/<user>/AndroidTools/crystax-ndk-10.3.1/toolchains/llvm-3.7/prebuilt/linux-x86_64/bin/clang++: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
make: *** [obj/local/armeabi/objs/cocostudio_static/WidgetReader/WidgetReader.o] Error 127
make: *** Waiting for unfinished jobs....
make: Leaving directory `/home/...../proj.android'
Error running command, return code: 2.

路径确实包含提到的Clang ++文件/工具链,我应该安装任何其他依赖项吗?运行Fedora 24。

编辑:

尝试使用Cocos推荐的android NDK v11进行编译我得到了不同的错误

make: Entering directory '/home/.....<projectDir>...../proj.android'
Android NDK: WARNING: APP_PLATFORM android-23 is larger than android:minSdkVersion 9 in ./AndroidManifest.xml    
[armeabi] Compile++ thumb: MyGame_shared <= main.cpp
[armeabi] Compile++ thumb: MyGame_shared <= AppDelegate.cpp
[armeabi] Compile++ thumb: MyGame_shared <= HelloWorldScene.cpp
/home/<user>/AndroidTools/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
/home/<user>/AndroidTools/android-sdk-linux/ndk-bundle/build/core/build-binary.mk:462: recipe for target 'obj/local/armeabi/objs-debug/MyGame_shared/__/__/Classes/AppDelegate.o' failed
make: *** [obj/local/armeabi/objs-debug/MyGame_shared/__/__/Classes/AppDelegate.o] Error 127
make: *** Waiting for unfinished jobs....
/home/<user>/AndroidTools/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
/home/<user>/AndroidTools/android-sdk-linux/ndk-bundle/build/core/build-binary.mk:462: recipe for target 'obj/local/armeabi/objs-debug/MyGame_shared/hellocpp/main.o' failed
make: *** [obj/local/armeabi/objs-debug/MyGame_shared/hellocpp/main.o] Error 127
/home/<user>/AndroidTools/android-sdk-linux/ndk-bundle/toolchains/llvm/prebuilt/linux-x86_64/bin/clang++: error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory
/home/<user>/AndroidTools/android-sdk-linux/ndk-bundle/build/core/build-binary.mk:462: recipe for target 'obj/local/armeabi/objs-debug/MyGame_shared/__/__/Classes/HelloWorldScene.o' failed
make: *** [obj/local/armeabi/objs-debug/MyGame_shared/__/__/Classes/HelloWorldScene.o] Error 127
make: Leaving directory '/home/.....<projectDir>...../proj.android'
Error running command, return code: 2.

我认为以下可能是问题的原因

error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

但是我已经安装了所有必需的库和文件,我想,我应该交叉检查任何特定的lib还是以任何其他方式修复?

1 个答案:

答案 0 :(得分:0)

通过安装缺少的ncurse库来修复它。默认情况下为命令

   iso                city        lat        lng
0   AB               city1  0.000000    0.000000
1   AB               city2  0.100000    0.200000
2   AB               city3  0.200000    0.400000
3   BC               city4  0.300000    0.600000
4   BC               city5  0.400000    0.800000
由于 dnf 包中包含安装了必要的库,

不返回任何内容,但事实证明它没有安装所有ncurses库,您还必须安装以下库以继续构建

  1. ncurses的COMPAT-库
  2. ncurses的静态
  3. ncurses的术语
  4. 此后构建继续成功。