在Android本机代码中使用cvBlobsLib库时出错

时间:2012-07-26 09:17:18

标签: android opencv makefile android-ndk

我需要在Android本机代码中使用cvBlobsLib库(cvblobslib_opencv_v8_3)。问题是当我运行Android.mk文件时,我收到一个错误:

  

致命错误:OpenCV / opencv / cxcore.h:没有这样的文件或目录

这是我的make文件:

LOCAL_PATH := $(call my-dir)

include $(CLEAR_VARS)

OPENCV_CAMERA_MODULES:=on
OPENCV_INSTALL_MODULES:=on

OPENCV_LIB_TYPE:=STATIC
include ../OpenCV-4.2/sdk/native/jni/OpenCV.mk

LOCAL_MINE_SRC_FILES := \
    micr/cvblobslib_opencv_v8_3/blob.cpp \
    micr/cvblobslib_opencv_v8_3/BlobContour.cpp \
    micr/cvblobslib_opencv_v8_3/BlobOperators.cpp \
    micr/cvblobslib_opencv_v8_3/BlobProperties.cpp \
    micr/cvblobslib_opencv_v8_3/BlobResult.cpp \
    micr/cvblobslib_opencv_v8_3/ComponentLabeling.cpp \

#####
LOCAL_SRC_FILES := $(LOCAL_MINE_SRC_FILES)
LOCAL_C_INCLUDES +=  \
    $(LOCAL_PATH) \
    $(LOCAL_PATH)/native/ \
    $(LOCAL_PATH)/native/cvblobslib_opencv_v8_3 \

LOCAL_LDLIBS +=  -llog -ldl

LOCAL_MODULE     := native
LOCAL_SHARED_LIBRARIES := native

include $(BUILD_SHARED_LIBRARY)

在OpenCV.mk中,包含该标题的文件夹包含:

  

OPENCV_LOCAL_C_INCLUDES:=“$(LOCAL_PATH)/ $(OPENCV_THIS_DIR)/ include / opencv”“$(LOCAL_PATH)/ $(OPENCV_THIS_DIR)/ include”

我错过了什么?

由于

1 个答案:

答案 0 :(得分:0)

我必须修改标题以包含而不是导入“opencv / cxcore.h” :)