compile c++ code that uses openCV on Windows
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MatlabUser
el 14 de Feb. de 2023
Comentada: MatlabUser
el 14 de Feb. de 2023
I am trying to run fileName.cpp code that includes opencv2 library
I have opencv installed on my system but I didn't know why when I use:
Mex fileName.cpp
I got this error:
Cannot open include file: 'opencv2/opencv.hpp': No such file or directory
it seems there is a problem in linking opencv library to Matlab so the mex file can find it? how can I do that for windows OS.
thank in advance ...
0 comentarios
Respuesta aceptada
Walter Roberson
el 14 de Feb. de 2023
mex does not know that it should link opencv2 if installed, and a lot of the time it would be a mistake to link it just because it is installed.
You should use the mex -I option to indicate the dictionary that contains opencv2, and the mex -L option to indicate the directory that contains the opencv2 DLLs
Más respuestas (0)
Ver también
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!