看板 AndroidDev 關於我們 聯絡資訊
環境: 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) 有點卡住了 煩請各位高手幫幫忙 感謝各位 -- ※ 發信站: 批踢踢實業坊(ptt.cc), 來自: 114.137.221.114 ※ 文章網址: https://www.ptt.cc/bbs/AndroidDev/M.1495438094.A.C7D.html