我需要在 Android 本机代码中使用 cvBlobsLib 库 ( cvblobslib_opencv_v8_3 )。问题是当我运行 Android.mk 文件时,出现错误:
致命错误:OpenCV/opencv/cxcore.h:没有这样的文件或目录
这是我的制作文件:
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"
我错过了什么?
谢谢