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

2 visualizzazioni (ultimi 30 giorni)
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?

Risposta accettata

Guillaume
Guillaume il 18 Giu 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 Commenti
Soham Patel
Soham Patel il 19 Giu 2018
i am try this one but still give me same error
Guillaume
Guillaume il 19 Giu 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?

Accedi per commentare.

Più risposte (0)

Categorie

Scopri di più su Write C Functions Callable from MATLAB (MEX Files) in Help Center e File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by