我正在尝试在android native c ++中使用opencv,但我将编译错误作为标题。这是我的代码
in cpp
#include <opencv2/core/core.hpp>
在android.mk中
OPENCV_LIB_TYPE := STATIC
OPENCV_CAMERA_MODULES := on
include fullpathToOpencv/OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCv.mk
在项目属性 - &gt; c / c ++ general-&gt;路径和符号中,我添加了
fullpathtoOpencv/OpenCV-2.4.9-android-sdk/sdk/native/jni/include
fullpathtoOpencv/OpenCV-2.4.9-android-sdk/sdk/native/jni/include/opencv
顺便说一下,我在osx上使用eclipse 4.2。 有没有人知道如何解决这个问题,谢谢。
下面是我的完整android.mk文件
LOCAL_PATH := $(call my-dir)
OPENCV_LIB_TYPE := STATIC
OPENCV_CAMERA_MODULES := on
include ../../dev/OpenCV-2.4.9-android-sdk/sdk/native/jni/OpenCv.mk
include $(CLEAR_VARS)
LOCAL_MODULE := CameraPreviewSample
LOCAL_SRC_FILES := CameraPreviewSample.cpp
include $(BUILD_SHARED_LIBRARY)