Page 1 of 1

Building Chipmunk2D for Android using CMake

Posted: Thu Apr 16, 2015 12:19 am
by o-simon
In Chipmunk2D/android/Android.mk they talk about using CMake to build Chipmunk2d for Android.

As per the comment of the commit when this file was added suggests, I'm using Android-CMake.

I invoke it like this:

Code: Select all

cd Chipmunk2D/
cmake -DCMAKE_TOOLCHAIN_FILE=../android-cmake/android.toolchain.cmake \
      -DANDROID_NDK=~/ndk \
      -DCMAKE_BUILD_TYPE=Release \
      -DANDROID_ABI="armeabi" . 
cmake --build .
Where Chipmunk2D is the folder containing the Chipmunk2D project, and android-cmake contains Android-CMake.

It seems that the resulting .a is not compiled for Android, but for my local host because when linking for Android ld complains "no archive symbol table (run ranlib)" and there are errors to undefined references to Chipmunk2D functions.

How do you build Chipmunk2D for Android using CMake?

Re: Building Chipmunk2D for Android using CMake

Posted: Fri Jul 31, 2015 1:42 pm
by bram
I built it without CMake.
The steps I used are expained here:

http://stackoverflow.com/a/31752980/301166

Bram Stolk