大致上是依照wiki的教學進行,
- 環境設置:
a. NDK路徑設置
ANDROID_NDK_ROOT=你的NDK路徑
b. 安裝 scons
sudo apt-get install scons
2. 下載原始碼以及編譯
git clone https://github.com/plutinosoft/Platinum.git
cd Platinum
git submodule update --init
scons target=arm-android-linux build_config=Release
若出現 scons: done building targets., 代表編譯成功
編譯失敗:
a. 若出現 arm-linux-androideabi-g++: not found 這個錯誤訊息
解法:
修改
Build/Targets/arm-android-linux/Config.scons 的 ANDROID_CROSS_PREFIX = 'arm-linux-androideabi' 的參數,
改為NDK ToolChains的絕對路徑, 如下
ANDROID_CROSS_PREFIX = '/opt/android-ndk-r9b/toolchains/arm-linux-androideabi-4.8/prebuilt/linux-x86_64/bin/arm-linux-androideabi'
b. 若出現 Neptune.h: No such file or directory 這個錯誤訊息
解法:
修改 Android.mk 內的 LOCAL_EXPORT_C_INCLUDES += $(PLT_ROOT)/../Neptune/Source/Core 的參數
改為如下描述
LOCAL_EXPORT_C_INCLUDES += $(PLT_ROOT)/ThirdParty/Neptune/Source/Core