MATLAB R2010b Mex support for Visual Studio 2013

Version 1.0.0.0 (5.38 KB) by Son Hua
Make MATLAB R2010b to detect C/C++ compiler in Visual Studio 2013.
308 Downloads
Updated 2 Mar 2016

View License

This is a hack to make MATLAB R2010b to detect C/C++ compiler from Visual Studio 2013.
1. Copy three files msvc120opts.stp, msvc120engmatopts.bat, msvc120opts.bat and copy to your MATLAB. For example, copy to C:\Program Files\MATLAB\R2010b\bin\win64\mexopts" for 64-bit Windows and to "C:\Program Files\MATLAB\R2010b\bin\win32\mexopts" for 32-bit Windows.

2. In Matlab, run
mex -setup
and choose Visual Studio 2013 as the compiler.

3. Run
mex
to test if the compiler can be called properly. If you see

"""
mex
Usage:
MEX [option1 ... optionN] sourcefile1 [... sourcefileN]
[objectfile1 ... objectfileN] [libraryfile1 ... libraryfileN]

Use the -help option for more information, or consult the MATLAB API Guide.


C:\MATLAB\R2010B\BIN\MEX.PL: Error: No file names given.
"""

then the compiler is found and ready to use.

Cheers!

P.S. This may not work for MATLAB R2013a.
You might want to use this instead: http://www.mathworks.com/matlabcentral/fileexchange/44408-matlab-mex-support-for-visual-studio-2013--and-mbuild-

Cite As

Son Hua (2024). MATLAB R2010b Mex support for Visual Studio 2013 (https://www.mathworks.com/matlabcentral/fileexchange/55713-matlab-r2010b-mex-support-for-visual-studio-2013), MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2010b
Compatible with any release
Platform Compatibility
Windows macOS Linux
Categories
Find more on MATLAB Compiler SDK in Help Center and MATLAB Answers
Tags Add Tags
mex

Community Treasure Hunt

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

Start Hunting!
Version Published Release Notes
1.0.0.0