Quantcast
Channel: OpenCV Q&A Forum - RSS feed
Viewing all articles
Browse latest Browse all 41027

How do I support c++11 in Opencv 3 Android NDK

$
0
0
Hi, all I am doing the next changes to support c++11 with opencv 3 in android NDK: I change from APP_STL := gnustl_static to APP_STL := c++_static Application.mk APP_STL := c++_static APP_CPPFLAGS := -std=c++11 -frtti -fexceptions APP_ABI := armeabi armeabi-v7a mips x86 arm64-v8a x86_64 mips64 APP_PLATFORM := android-14 # use this to select gcc instead of clang NDK_TOOLCHAIN_VERSION := 4.9 Android.mk LOCAL_PATH := $(call my-dir) LOCAL_PATH_LIB_DIR:=library/lib/classifier include $(CLEAR_VARS) OPENCV_CAMERA_MODULES:=off OPENCV_INSTALL_MODULES:=on OPENCV_LIB_TYPE:=SHARED include ../../../OpenCV-android-sdk/sdk/native/jni/OpenCV.mk LOCAL_MODULE:= detection_based_tracker LOCAL_SRC_FILES := DetectionBasedTracker_jni.cpp \ library/jniUtils.cpp \ ${ LOCAL_PATH_LIB_DIR}/logic.cpp \ ${ LOCAL_PATH_LIB_DIR}/logic2.cpp \ LOCAL_C_INCLUDES += $(LOCAL_PATH) LOCAL_LDLIBS += -llog -ldl -lm -latomic -L$(LOCAL_PATH)/libs/armeabi - L$(LOCAL_PATH)/libs/armeabi-v7a -L$(LOCAL_PATH)/libs/mips -L$(LOCAL_PATH)/libs/x86 -L$(LOCAL_PATH)/libs/arm64-v8a -L$(LOCAL_PATH)/libs/mips64 -L$(LOCAL_PATH)/libs/x86_64 LOCAL_CPPFLAGS += -ljnigraphics -D_LINUX -DBOOST_HAS_PTHREADS -fexceptions -std=c++11 -I$(LOCAL_PATH)/ -I$(LOCAL_PATH)/library/lib/pico/ I LOCAL_CPP_FEATURES := exceptions rtti APP_OPTIM := debug include $(BUILD_SHARED_LIBRARY) When I compile the Android app with Android NDK r10e. I hav the next errores in the Log: error: undefined reference to 'cv::DescriptorMatcher::match(cv::_InputArray const&, cv::_InputArray const&, std::__1::vector>&, cv::_InputArray const&) const' undefined reference to 'cv::Subdiv2D::insert(std::__1::vector,std::__1::allocator>> const&)' error: undefined reference to 'cv::imwrite(cv::String const&, cv::_InputArray const&, std::__1::vector> const&)' the undefined reference to cv::imwrite method, this method is in the native SDK opencv in the path "opencv/imgcodecs.hpp" CV_EXPORTS_W bool imwrite( const String& filename, InputArray img, const std::vector& params = std::vector());

Viewing all articles
Browse latest Browse all 41027

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>