Has somebody ported and used Boost on Android?
I've found the tool which builds boost for android (https://github.com/MysticTreeGames/Boost-for-Android), the build is successful, and i've got static boost libs. But when i'm tring to use it in simple android app:
#include <jni.h>
#include "boost/thread.hpp"
void f()
{
};
i've got a lot of compilation errors: redefinitions, undeclared etc. Seems it concerns NDK std headers. My Android.mk looks like:
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
TARGET_PLATFORM := android-8
LOCAL_MODULE := Boost
LOCAL_CFLAGS := -DMYSTIC -I$(LOCAL_PATH)/boost/include/
LOCAL_LDLIBS := -L$(LOCAL_PATH)/external/boost/lib/
LOCAL_CPPFLAGS := -fexceptions
LOCAL_CPPFLAGS += -frtti
LOCAL_CPPFLAGS += -DBOOST_THREAD_LINUX
LOCAL_CPPFLAGS += -DBOOST_HAS_PTHREADS
LOCAL_CPPFLAGS += -D__arm__
LOCAL_CPPFLAGS += -D_REENTRANT
LOCAL_CPPFLAGS += -D_GLIBCXX__PTHREADS
LOCAL_CPPFLAGS += -DBOOST_HAS_GETTIMEOFDAY
LOCAL_SRC_FILES := main.cpp
include $(BUILD_SHARED_LIBRARY)
Also I tried to build with Crystax_NDK_r4 and Android_NDK_r5b but it hasn't resolved the problem.
Any ideas?