MATLAB R2010b Mex support for Visual Studio 2013
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
Platform Compatibility
Windows macOS LinuxCategories
Tags
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!Discover Live Editor
Create scripts with code, output, and formatted text in a single executable document.
Version | Published | Release Notes | |
---|---|---|---|
1.0.0.0 |