Compiling MEX files with Visual C++ 2010 with matlab2009a

1 view (last 30 days)
I'm trying to get MATLAB 2009a to find Visual C++ 2010, but it doesn't seem to. Is there a patch available?

Accepted Answer

James Tursa
James Tursa on 12 Feb 2011
One way is to do the following:
1) Start with files that already work for a previous version, such as 2008, and then modify them as Matt Fig suggested. e.g., start with the following files:
msvc90engmatopts.bat
msvc90opts.bat
msvc90opts.stp
2) Copy them to new files with 100 instead of 90. e.g.,
msvc100engmatopts.bat
msvc100opts.bat
msvc100opts.stp
3) Edit these new files and make obvious changes:
2008 --> 2010
9.0 --> 10.0
90 --> 100
9 --> 10
and in the msvc100opts.stp file make the additional change:
"15.0" --> "16.0"

More Answers (2)

Matt Fig
Matt Fig on 10 Feb 2011
You will have to modify a couple of the MATLAB bat files in order for the option to be seen. Alternatively, you could download VC++ 2008 or so.
  2 Comments
Matt Fig
Matt Fig on 10 Feb 2011
I assume you mean editing the files. Well, I wasn't able to do it myself, but another regular around here offered to help me. As I don't know how he feels about me giving out his work and/or contact info, I cannot say more about it. I guess it would depend on your skill level. Good luck.

Sign in to comment.


Kaustubha Govind
Kaustubha Govind on 11 Feb 2011
The most reliable thing to do is get a supported compiler: http://www.mathworks.com/support/compilers/release2009a/

Categories

Find more on MATLAB Compiler in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!