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

3 Ansichten (letzte 30 Tage)
Soham Patel
Soham Patel am 18 Jun. 2018
Kommentiert: Guillaume am 19 Jun. 2018
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?

Akzeptierte Antwort

Guillaume
Guillaume am 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 Kommentare
Soham Patel
Soham Patel am 19 Jun. 2018
i am try this one but still give me same error
Guillaume
Guillaume am 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?

Melden Sie sich an, um zu kommentieren.

Weitere Antworten (0)

Kategorien

Mehr zu Write C Functions Callable from MATLAB (MEX Files) finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by