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

1 次查看(过去 30 天)
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?

采纳的回答

Guillaume
Guillaume 2018-6-18
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 个评论
Guillaume
Guillaume 2018-6-19
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?

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Write C Functions Callable from MATLAB (MEX Files) 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by