我在尝试使用MATLAB模块编译OpENCV时会遇到以下错误。
我刚刚在我在opencv.org的教程中创建的REALSE文件夹中运行$ MAKE
[ 98%] Compiling Matlab source files. This could take a while...
CMake Error at /home/alex/Downloads/opencv-master/modules/matlab/compile.cmake:47 (message):
Failed to compile drawChessboardCorners: /usr/bin/ld: cannot find
-lopencv_core
/usr/bin/ld: cannot find -lopencv_imgproc
(Removed alot of lines with lib files here)
collect2: error: ld returned 1 exit status
mex: link of ' "drawChessboardCorners.mexa64"' failed.
如何修复链接错误?它与matlab有关吗?
Matlab 2013aUbuntu 13.10
我认为这与Matlab无关。:
/usr/bin/ld: cannot find
指向链接器在编译过程中无法找到的opencv_core
库的缺失路径。请参阅:usr/bin/ld:找不到-l< nameofthelibrary>
如果您是手动构建的,则可以添加-L
选项,例如
-L<path_to_opencv_core>
在-lopencv_core
或-lopencv_imgproc
到命令行构建命令。如果您使用的是CMAKE文件,则可以设置${OPENCV_LIB_INSTALL_PATH}
(或类似的内容),例如,使用ccmake.