MATLAB R2010b Mex support for Visual Studio 2013

Make MATLAB R2010b to detect C/C++ compiler in Visual Studio 2013.

You are now following this Submission

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 (2026). 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 .

Tags

Add Tags

General Information

MATLAB Release Compatibility

  • Compatible with any release

Platform Compatibility

  • Windows
  • macOS
  • Linux
Version Published Release Notes Action
1.0.0.0