[問題] undefined reference to cv::_InputArray

作者: comie   2017-05-22 15:28:12
環境: android studio 2.3.2 & opencv2.4.9
編譯 jni 環境
cv::resize(image, resized, newSize);
會出現錯誤訊息如下
Error:(25) undefined reference to 'cv::_InputArray::_InputArray(cv::Mat
const&)'
Error:(25) undefined reference to 'cv::_OutputArray::_OutputArray(cv::Mat&)'
Error:(25) undefined reference to 'cv::resize(cv::_InputArray const&,
cv::_OutputArray const&, cv::Size_<int>, double, double, int)'
但是按 ctrl+B 找尋定義都找的到(在 imgproc.hpp)
CMakeLists.txt內也有加入 .a 的描述
set(lib_src_DIR ${CMAKE_SOURCE_DIR}/src/main/jniLibs/${ANDROID_ABI})
include_directories(${CMAKE_SOURCE_DIR}/src/main/cpp/include)
add_library( libopencv_imgproc
STATIC
IMPORTED)
set_target_properties( # Specifies the target library.
libopencv_imgproc
# Specifies the parameter you want to define.
PROPERTIES IMPORTED_LOCATION
# Provides the path to the library you want to import.
${lib_src_DIR}/libopencv_imgproc.a)
有點卡住了
煩請各位高手幫幫忙
感謝各位

Links booklink

Contact Us: admin [ a t ] ucptt.com