down vote
favorite
all
I have Problems to compile opencv library with support c++11 in Android NDK, I have a project configure with opencv 2.4.11 and i need to use some classes that support c++11, but when I enable c++11 in the project and compile with Android NDK, the project doesn't work.
I did the next inside jni folder:
enable c++11 in the next files:
Android.mk file
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
OPENCV_CAMERA_MODULES:=off
OPENCV_INSTALL_MODULES:=off
OPENCV_LIB_TYPE:=STATIC
include /OpenCV-android-sdk/sdk/native/jni/OpenCV.mk
LOCAL_SRC_FILES := DetectionBasedTracker_jni.cpp
LOCAL_C_INCLUDES += $(LOCAL_PATH)
LOCAL_LDLIBS += -llog -ldl
LOCAL_MODULE := detection_based_tracker
include $(BUILD_STATIC_LIBRARY)
Application.mk file
//change gnustl_static to c++_static
APP_STL := c++_static
//add -std=c++11 to enable support c++11
APP_CPPFLAGS += -std=c++11 -frtti -fexceptions
APP_ABI := armeabi-v7a
APP_PLATFORM := android-13
NDK_TOOLCHAIN_VERSION := 4.8
When I compile with NDK command ndk-build, I have the next error:
OpenCV-android- sdk/sdk/native/jni/include/opencv2/core/operations.hpp:77:29: fatal error: atomicity.h: No such file or directory #include
Would you help me with issue, thank you.
↧