成功編譯OpenCV的95%之後,我得到的錯誤錯誤而編譯/鏈接OpenCV的Matlab的源文件
(...)
[ 95%] Built target opencv_videostab
[ 95%] Generating Matlab source files
[ 95%] Built target opencv_matlab_sources
[ 95%] Compiling Matlab source files. This could take a while...
CMake Error at compile.cmake:47 (message):
Failed to compile logPolar: /usr/bin/ld: cannot find -lopencv_core
/usr/bin/ld: cannot find -lopencv_imgproc
/usr/bin/ld: cannot find -lopencv_ml
/usr/bin/ld: cannot find -lopencv_highgui
/usr/bin/ld: cannot find -lopencv_objdetect
/usr/bin/ld: cannot find -lopencv_flann
/usr/bin/ld: cannot find -lopencv_features2d
/usr/bin/ld: cannot find -lopencv_photo
/usr/bin/ld: cannot find -lopencv_video
/usr/bin/ld: cannot find -lopencv_videostab
/usr/bin/ld: cannot find -lopencv_calib3d
/usr/bin/ld: cannot find -lopencv_stitching
/usr/bin/ld: cannot find -lopencv_superres
/usr/bin/ld: cannot find -lopencv_nonfree
collect2: ld returned 1 exit status
mex: link of ' "logPolar.mexa64"' failed.
make[2]: *** [modules/matlab/compile.proxy] Error 1
make[1]: *** [modules/matlab/CMakeFiles/opencv_matlab.dir/all] Error 2
make: *** [all] Error 2
這讓我困惑,因爲據我瞭解所有的這些應該已經早些時候編譯建立過程。使用的cmake命令是
cmake -D MATLAB_ROOT_DIR=/usr/lib/matlab2012a/ -D CMAKE_INSTALL_PREFIX=/home/user ..
不幸的是,這似乎並沒有爲我工作。 – haroba