Building Chipmunk2D for Android using CMake

Official forum for the Chipmunk2D Physics Library.

Building Chipmunk2D for Android using CMake

Postby o-simon » Thu Apr 16, 2015 12:19 am

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?
o-simon
 
Posts: 5
Joined: Thu Jun 19, 2014 1:26 am

Re: Building Chipmunk2D for Android using CMake

Postby bram » Fri Jul 31, 2015 1:42 pm

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

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

Bram Stolk
bram
 
Posts: 25
Joined: Sun May 24, 2009 11:04 pm


Return to Chipmunk2D Physics

Who is online

Users browsing this forum: No registered users and 2 guests

cron