mex compliation problem with include paths for file mexopts.bat
4 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
HI,
I am really very Frustrated of doing mex stuff, I am trying for more than 3 Days I know there is very little thing that need to be done to make mex displayImage.cpp to work
I have installed VS10, SDK7.1, MAtlab2012a,opencv 2.3, Everything is fine
Also I am not able to run mex-setup again it giving me following error
mex-setup
Usage:
MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]
Use the -help option for more information, or consult the MATLAB API Guide.
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: No file names given.
Undefined function or variable 'setup'
and if I run the cpp File it gives me following error
mex displayImage.cpp
displayImage.cpp
displayImage.cpp(5) : fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Compile of 'displayImage.cpp' failed.
Error using mex (line 206)
Unable to complete successfully.
even stdio.h is inside the folder of my current working Directory.
Looking forward....
Thanks and regards
Risposte (2)
turab
il 30 Ago 2013
i have the exact same problem. i have also read on a page that matlab 2012a and visual studio 2010 donot support initially there is a patch for this purpose i have downloaded this patch and placed in the matlabroot but the problem remains the same the error i am constantly getting is : mex displayimg.cpp Error: Could not find the compiler "cl" on the DOS path. Use mex -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2012A\BIN\MEX.PL: Error: Unable to locate compiler.
plz give me some helpful suggestions thanx.
2 Commenti
Ken Atwell
il 30 Ago 2013
This error is unrelated to what Muhammad is reporting -- I recommend you begin a new topic.
Ken Atwell
il 30 Ago 2013
Modificato: Jan
il 30 Ago 2013
I would not reinstall MATLAB or Visual Studio; you have a path problem that reinstalling will not solve.
Are you sure cv.h is in C:\opencv, and not a subfolder under it? I am not familiar with OpenCV, but I would try:
mex -IC:\opencv\include\opencv displayImage.cpp
If that fails, open the Explorer and locate the name of the folder where cv.h is found. Wherever that is, put that folder name (not filename) as the -I parameter to MEX.
And, yes, if you rerun "mex -setup", it will clobber any customization you may have made to mexopt.bat. In general, I would only edit this file as a last resort.
5 Commenti
Vedere anche
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!