cocos2d-x2.2.3生成的工程在android下编译出错
Chaim:proj.android Chaim$ ./build_native.sh
NDK_ROOT = /Users/Chaim/android-ndk-r8e
COCOS2DX_ROOT = /Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android/../../..
APP_ROOT = /Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android/..
APP_ANDROID_ROOT = /Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android
Using prebuilt externals
make: Entering directory `/Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android'
Compile++ thumb : game_shared <= main.cpp
cc1plus: fatal error: ./obj/local/armeabi/objs/game_shared/hellocpp/main.d: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/game_shared/hellocpp/main.o] Error 1
make: Leaving directory `/Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android'
查了一下也没看出哪问题,直接找一个可以用的application.mk文件覆盖,可以正常编译了
APP_STL := gnustl_static
NDK_TOOLCHAIN_VERSION := clang
APP_OPTIM := release
TARGET_CPU_API := armeabi
TARGET_ARCH_ABI := armeabi
APP_ABI := armeabi
APP_GNUSTL_FORCE_CPP_FEATURES := exceptions rtti
APP_CPPFLAGS := -frtti -DUSE_FILE32API -DANDROID -DCC_LUA_ENGINE_ENABLED=1 \
-DGXX_EXPERIMENTAL_CXX0X -Wno-error
原有不能编译的是这个样子:
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -DCOCOS2D_DEBUG=1
具体原因也不想查了,就是哪个参数设置问题
Chaim:proj.android Chaim$ ./build_native.sh
NDK_ROOT = /Users/Chaim/android-ndk-r8e
COCOS2DX_ROOT = /Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android/../../..
APP_ROOT = /Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android/..
APP_ANDROID_ROOT = /Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android
Using prebuilt externals
make: Entering directory `/Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android'
Compile++ thumb : game_shared <= main.cpp
cc1plus: fatal error: ./obj/local/armeabi/objs/game_shared/hellocpp/main.d: No such file or directory
compilation terminated.
make: *** [obj/local/armeabi/objs/game_shared/hellocpp/main.o] Error 1
make: Leaving directory `/Users/Chaim/Documents/workspace/cocos2d-x-2.2.3/projects/MobileTest/proj.android'
查了一下也没看出哪问题,直接找一个可以用的application.mk文件覆盖,可以正常编译了
APP_STL := gnustl_static
NDK_TOOLCHAIN_VERSION := clang
APP_OPTIM := release
TARGET_CPU_API := armeabi
TARGET_ARCH_ABI := armeabi
APP_ABI := armeabi
APP_GNUSTL_FORCE_CPP_FEATURES := exceptions rtti
APP_CPPFLAGS := -frtti -DUSE_FILE32API -DANDROID -DCC_LUA_ENGINE_ENABLED=1 \
-DGXX_EXPERIMENTAL_CXX0X -Wno-error
原有不能编译的是这个样子:
APP_STL := gnustl_static
APP_CPPFLAGS := -frtti -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -DCOCOS2D_DEBUG=1
具体原因也不想查了,就是哪个参数设置问题