-
Notifications
You must be signed in to change notification settings - Fork 143
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem building mex files #1
Comments
Hi, I guess that the command you entered might not correct. The true one is as follow: mex generateEllipseCandidates.cpp -ID:\OpenCV\opencv\build\include -ID:\OpenCV\opencv\build\include\opencv -ID:\OpenCV\opencv\build\include\opencv2 -LD:\OpenCV\opencv\build\x64\vc11\lib -LC:\Program Files\MATLAB\R2018b\extern\include -LC:\Program Files\MATLAB\R2018b\extern\lib\win64\microsoft -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -llibmwlapack.lib Please try again. |
Still not working. For a reason mex is looking for a folder "Files" inside the project folder |
Ok, please check whether each folder containing the corresponding lib files. For example, it should have lib file "opencv_core249" in the folder "D:\OpenCV\opencv\build\x64\vc11\lib" and should have "libmwlapack.lib" in the "C:\Program Files\MATLAB\R2018b\extern\lib\win64\microsoft". In addition, please check whether each entered path exists or not. |
And the current working directory of MATLAB should also be same as the directory of source code. |
Thanks for your reply but the problem still persist. I've checked the libraries path and everything is ok. Maybe is my matlab version. I'll try it in a different version |
My MATLAB version is R2016b. |
Do not forget to set the path in quotes if it contains spaces! |
@JosePizarro |
Hi. I openCV2.4.9 installed in C:\Users\Administrator\Desktop directory. The command I used was the following:
but I'm getting this error: so could you give me some advice? |
Hi, justiner. I guess your command may be incorrect. For example, -L**'IC:\Program Files\MATLAB\MATLAB Runtime\v90\extern\include'** -L**'IC:\Program Files\MATLAB\MATLAB Runtime\v90\extern\lib\win64\microsoft'** should be replaced by -I'C:\Program Files\MATLAB\MATLAB Runtime\v90\extern\include' -L'C:\Program Files\MATLAB\MATLAB Runtime\v90\extern\lib\win64\microsoft' Please read the instructions and answer #4 carefully. |
The problem has been solved! Thank you all! |
Thanks for your guide,Thank you very much ! |
@justinner I believe that the problem is in the location of your MATLAB folder. mex is unable to access files from Program Files. Hence, for a simple hack I copied the MATLAB folder to C drive, provide a new location and you will be able to compile it successfully. I ran the following command: mex generateEllipseCandidates.cpp -IC:\opencv\build\include -IC:\opencv\build\include\opencv -IC:\opencv\build\include\opencv2 -LC:\opencv\build\x64\vc11\lib -IC:\Users\jaimeetp\Documents\MATLAB\R2019a\extern\include -LC:\Users\jaimeetp\Documents\MATLAB\R2019a\extern\lib\win64\microsoft -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -llibmwlapack.lib |
Hi I am getting this error can anyone tell me what is the issue ? Error using mex I ran this command : mex generateEllipseCandidates.cpp -IC:\opencv\build\include -IC:\opencv\build\include\opencv -IC:\opencv\build\include\opencv2 -LC:\opencv\build\x64\vc11\lib -I'C:\Program Files\Polyspace\R2019a\extern\include' -L'C:\Program Files\Polyspace\R2019a\extern\lib\win64\microsoft' -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -llibmwlapack.lib |
There is an error as following: So, can you give me some suggestions? |
Hi. I openCV2.4.9 installed in D:\OpenCV directory. The command I used was the following:
mex generateEllipseCandidates.cpp -ID:\OpenCV\opencv\build\include -ID:\OpenCV\opencv\build\include\opencv -ID:\OpenCV\opencv\build\include\opencv2 -LD:\OpenCV\opencv\build\x64\vc11\lib -LC:\Program Files\MATLAB\R2018b\extern\include -LC:\Program Files\MATLAB\R2018b\extern\lib\win64\microsoft -lopencv_core249 -lopencv_highgui249 -lopencv_imgproc249 -llibmwlapack.libmex
but I'm getting this error:
Error using mex
C:\High-quality-ellipse-detection-master\Files\MATLAB\R2018b\extern\include not found; check that you are in the correct
current folder, and check the spelling of 'C:\High-quality-ellipse-detection-master\Files\MATLAB\R2018b\extern\include'.
The text was updated successfully, but these errors were encountered: