简体   繁体   English

Cocos2d-x v3.12编译失败

[英]Cocos2d-x v3.12 compile fails

Recently updated Cocos2d-x to v 3.12 and created the "Hello World!" 最近将Cocos2d-x更新为v 3.12,并创建了“ Hello World!”。 project but the CLI command fails, log as shown bellow: 项目,但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.

The path does contain the mentioned Clang++ file/toolchain, should I be installing any other dependencies? 该路径包含提到的Clang ++文件/工具链,我是否应该安装任何其他依赖项? Running Fedora 24. 运行Fedora 24。

Edit: 编辑:

Trying to compile with the Cocos recommended android NDK v11 I get a different error 尝试使用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.

And I think the following may be the reason for the problem 而且我认为以下可能是导致问题的原因

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

But I have installed all the necessary libs and files, I think, should I cross check for any particular lib or is the fixable in any other way? 但是我想我已经安装了所有必需的库和文件,我应该交叉检查任何特定的库还是可以其他方式修复?

Fixed it by installing the missing ncurse libs. 通过安装缺少的ncurse库修复了它。 By default the command 默认情况下,该命令

dnf install ncurses

returns nothing to install as the dnf package contains the necessary libs installed, but it turns out that it does not install all the ncurses libs, you will have to also install the following libs to continue building. 由于dnf软件包包含已安装的必需库,因此没有任何安装返回,但是事实证明它并未安装所有ncurses库,因此您还必须安装以下库才能继续构建。

  1. ncurses-compat-libs ncurses-compat-libs
  2. ncurses-static 静态的
  3. ncurses-term 词项

The build continued successfully after this. 此后,构建成功继续。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM