Building Chipmunk2D for Android using CMake

Official forum for the Chipmunk2D Physics Library.
Post Reply
o-simon
Posts: 5
Joined: Thu Jun 19, 2014 1:26 am
Contact:

Building Chipmunk2D for Android using CMake

Post 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?
bram
Posts: 25
Joined: Sun May 24, 2009 11:04 pm
Contact:

Re: Building Chipmunk2D for Android using CMake

Post by bram »

I built it without CMake.
The steps I used are expained here:

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

Bram Stolk
Post Reply

Who is online

Users browsing this forum: No registered users and 10 guests