Facing problem in generating a mex file

28 次查看(过去 30 天)
I have install opencv also and give following syntax as directed in github but is showing below error
mex generateEllipseCandidates.cpp -IC:\Program Files\MATLAB\opencv-2.4.9\build\include -IC:\Program Files\MATLAB\opencv-2.4.9\build\include\opencv -IC:\Program Files\MATLAB\opencv-2.4.9\build\include\opencv2 -lC:\Program Files\MATLAB\opencv-2.4.9\build\x64\vc11\lib -IC:\Program Files\MATLAB\R2019b\extern\include -lC:\Program Files\MATLAB\R2019b\extern\lib\win64\microsoft -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -llibmwlapack.lib
Error using mex
C:\ProgramFiles\MATLAB\High-quality-ellipse-detection-master\High-quality-ellipse-detection-master\Files\MATLAB\opencv-2.4.9\build\include
not found; check that you are in the correct current folder, and check the spelling of 'C:\Program
Files\MATLAB\High-quality-ellipse-detection-master\High-quality-ellipse-detection-master\Files\MATLAB\opencv-2.4.9\build\include'.

回答(1 个)

Praveen Iyyappan Valsala
Could be because of the spaces in the file paths. Try encapsulating them in double quotes.
mex generateEllipseCandidates.cpp -I"C:\Program Files\MATLAB\opencv-2.4.9\build\include" ...
source: https://in.mathworks.com/matlabcentral/answers/443823-mex-include-path-merged-with-working-directory-path

类别

Help CenterFile Exchange 中查找有关 MATLAB Compiler 的更多信息

产品

Community Treasure Hunt

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

Start Hunting!

Translated by