You can clone with
HTTPS or Subversion.
Geos is not supported because the Android NDK apparently lacks the most basic of C++ library support (no STL!). Right now it fails with missing headers for most of the stuff in /usr/include/c++. So right now, I've removed it from the build (-DOMIT_GEOS=1).
When I was poking around with it this past weekend I was able to get GEOS to compile by specifying some C++-specific stuff in the Android.mk file. Here's what my makefile looked like:
LOCAL_PATH:= $(call my-dir)
LOCAL_MODULE := libgeos
LOCAL_C_INCLUDES := \
LOCAL_CFLAGS := $(LOCAL_C_INCLUDES:%=-I%)
LOCAL_LDLIBS := -L$(SYSROOT)/usr/lib -ldl
LOCAL_STL := gnustl_static
LOCAL_CPPFLAGS += -fexceptions
LOCAL_CPPFLAGS += -frtti
LOCAL_SRC_FILES := \
Hi iandees, I'm new at all this, I'm trying to crosscompile geos to Android, I've two questions, is the make file read automatically when building or how do I use it? as well what are the ... for?
I use this to compile:
#SET compile flags
CXXFLAGS="-nostdlib -I$NDK_PLATFORM/usr/include -I$NDK/sources/cxx-stl/gnu-libstdc++/include -I$NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -DHAVE_ISNAN" \
CFLAGS=" -nostdlib -I$NDK_PLATFORM/usr/include -I$NDK/sources/cxx-stl/gnu-libstdc++/include -I$NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include" \
LDFLAGS="-L$NDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi -L$NDK_PLATFORM/usr/lib --sysroot=$NDK_PLATFORM -Wl,-rpath-link=$NDK_PLATFORM/usr/lib -lc" \
./configure --prefix=$INSTALL_DIR --host=arm-linux-androideabi
make -j$CORES 2>&1 | tee make.out
Thanks a lot
The .... is me cutting out the listing of all the cpp files in the GEOS distribution.
I immagined that. the other issue was the more important one ;)
You don't run Make when building NDK projects. Read the readme for the project or the NDK docs.
Basically, you run ndk_build in the parent directory.
Hi, i compiled geos using the standalone toolchain of r5c with less issues than using mk files. Thanks for the hints anyway