我有一个非常重要的旧项目,用Cocos2d-x 2.2.6编写,并且使用Eclipse Neon 3 for Android进行构建,而在安装了Mac OSX Mojave和Xcode 9.4的Mac Book Pro上没有任何问题。
当我尝试使用所有相同的Mac OSX Mojave,Eclipse Neon 3但Xcode 10.2.1在iMac上构建它时,它失败并显示错误:
bash /Users/admin/Documents/Android/cocos2d-x-2.2.6/projects/TheGame/proj.android/build_native.sh
NDK_ROOT = /Users/admin/Documents/_AndroidSupport/android-ndk-r10e
COCOS2DX_ROOT = /Users/admin/Documents/Android/cocos2d-x-2.2.6/projects/TheGame/proj.android/../../..
APP_ROOT = /Users/admin/Documents/Android/cocos2d-x-2.2.6/projects/TheGame/proj.android/..
APP_ANDROID_ROOT = /Users/admin/Documents/Android/cocos2d-x-2.2.6/projects/TheGame/proj.android
Using prebuilt externals
Android NDK: WARNING:/Users/admin/Documents/Android/cocos2d-x-2.2.6/projects/TheGame/proj.android/../../../cocos2dx/Android.mk:cocos2dx_static: LOCAL_LDLIBS is always ignored for static libraries
make: Entering directory `/Users/admin/Documents/Android/cocos2d-x-2.2.6/projects/TheGame/proj.android'
[armeabi-v7a] Compile++ thumb: cocos2dcpp_shared <= main.cpp
<command-line>:0:0: warning: "CC_ENABLE_CHIPMUNK_INTEGRATION" redefined [enabled by default]
<command-line>:0:0: note: this is the location of the previous definition
clang: error: unsupported option '--noexecstack'
clang: error: unsupported option '--noexecstack'
clang: error: unknown argument '-meabi=5', did you mean '-mabi=5'?
make: *** [obj/local/armeabi-v7a/objs/cocos2dcpp_shared/hellocpp/main.o] Error 1
make: Leaving directory `/Users/admin/Documents/Android/cocos2d-x-2.2.6/projects/TheGame/proj.android'
我认为问题可能出在Xcode更新后,LLVM编译器有所不同,但是如果我将gcc -v
和g++ -v
放在build_native.sh
上,它将返回相同的Apple LLVM版本10.0.1( clang-1001.0.46.4)在两台机器上
我花了一个星期,没有成功,请帮忙...