Clear Filters
Clear Filters

Why MEX cannot find library 'm' specified with the -l option?

1 view (last 30 days)
mex -O -I/usr/include/opencv -lcxcore -lcv -lhighgui -c seeds2.cpp
mex -O mexSEEDS.cpp -I/usr/include/opencv -lcxcore -lcv -lhighgui seeds2.o
i am getting error in this file MEX cannot find library 'cxcore' specified with the -l option. MEX looks for a file with one of the names: libcxcore.lib cxcore.lib Please specify the path to this library with the -L option.
can you help me to solved this error? my opencv folder in c drive in download "C:\Users\Admin\Downloads\opencv" can you help to write path of opencv?

Accepted Answer

Guillaume
Guillaume on 18 Jun 2018
I assume you're following some instructions in order to compile some mex library. Clearly, from the format of the paths the instructions you're following are for a Linux OS, whereas you're on Windows.
Find the instruction for Windows. Possibly this may work:
mex -O '-LC:\Users\Admin\Downloads\opencv' -lcxcore -lcv -lhighgui -c seeds2.cpp
mex -O mexSEEDS.cpp '-IC:\Users\Admin\Downloads\opencv' -lcxcore -lcv -lhighgui seeds2.o
  2 Comments
Guillaume
Guillaume on 19 Jun 2018
Have you found the instructions for Windows, yet? As said, you'd be better follow them. It'll be more reliable than me guessing at what needs to be done.
Have you checked that there is a cxcore.lib or libcxcore.lib file in C:\Users\Admin\Downloads\opencv ? If it's not there, where is it?

Sign in to comment.

More Answers (0)

Categories

Find more on Write C Functions Callable from MATLAB (MEX Files) in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!