Android Studio NDK linker error undefined reference to 'cv::_OutputArray::_OutputArray(cv::Mat&)'

后端 未结 1 1345
被撕碎了的回忆
被撕碎了的回忆 2021-01-27 08:58

I\'m working on an Android project which uses NDK, in which I have used opencv for some capture and image effects stuff. Here\'s how my Android.mk look like:

LOC         


        
相关标签:
1条回答
  • 2021-01-27 09:16

    Fixed it. I dont know the exact reason how it get fixed. I reverted all the changes I've made in Android.mk , Application.mk and OpenCV.mk, Now my Adnroid.mk looks like this:

    LOCAL_PATH := $(call my-dir)
    
    include $(CLEAR_VARS)
    OPENCV_INSTALL_MODULES:=on
    include $(LOCAL_PATH)/sdk/native/jni/OpenCV.mk
    
    LOCAL_MODULE    := Scanner
    LOCAL_SRC_FILES := scan.cpp
    LOCAL_LDLIBS    += -lm -llog -landroid
    LOCAL_LDFLAGS += -ljnigraphics
    include $(BUILD_SHARED_LIBRARY)
    

    And Application.mk:

    APP_STL := stlport_static
    APP_CPPFLAGS := -frtti -fexceptions
    APP_ABI := all
    APP_PLATFORM := android-14
    

    And here's how my OpenCV.mk looks like:

    https://pastebin.com/zuqM6tbu

    I guess I have missed specyfying the correct path or my library files(.so and .a) might be of different versions than the header files included. If anyone got other ideas, please post a comment.

    0 讨论(0)
提交回复
热议问题