0

I am getting the following error when trying to compile openCV with the matlab module.

I just run $make in the realse folder that I created like in the tutorial from opencv.org

    [ 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.

How do I fix the link error? Does it have something to do with matlab?

MATLAB 2013a Ubuntu 13.10

alexjson
  • 1
  • 1
  • 1

1 Answers1

0

I don't think this is related to MATLAB. The:

/usr/bin/ld: cannot find

points probably to a missing path for the opencv_core library that the linker cannot find during compilation. See: usr/bin/ld: cannot find -l<nameOfTheLibrary>

If you are building manually you could add an -L option, e.g.,

-L<path_to_opencv_core> before the -lopencv_core or -lopencv_imgproc

to the command line build command. If you are using a CMake file, there may be an ${OPENCV_LIB_INSTALL_PATH} (or something similar) that you can set, e.g., using ccmake.

Community
  • 1
  • 1
gevang
  • 4,994
  • 25
  • 33