Setting up mex to use the Visual Studio 2013 compiler

Hello, I have installed Microsoft Visual Studio C++ 2013. However, Matlab cannot detect the compiler. When I used the mex -setup and answered "n", I got the following list:
>> mex -setup
Welcome to mex -setup. This utility will help you set up
a default compiler. For a list of supported compilers, see
http://www.mathworks.com/support/compilers/R2012b/win32.html
Please choose your compiler for building MEX-files:
Would you like mex to locate installed compilers [y]/n? n
Select a compiler:
[1] Intel C++ 12.0 (with Microsoft Software Development Kit (SDK) linker)
[2] Intel C++ 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[3] Intel C++ 12.0 (with Microsoft Visual C++ 2010 linker)
[4] Intel C++ 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[5] Intel Visual Fortran 12 (with Microsoft Software Development Kit (SDK) linker)
[6] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 SP1 linker)
[7] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2008 Shell linker)
[8] Intel Visual Fortran 12.0 (with Microsoft Visual C++ 2010 linker)
[9] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 SP1 linker)
[10] Intel Visual Fortran 11.1 (with Microsoft Visual C++ 2008 Shell linker)
[11] Lcc-win32 C 2.4.1
[12] Microsoft Software Development Kit (SDK) 7.1
[13] Microsoft Visual C++ 2005 SP1
[14] Microsoft Visual C++ 2008 SP1
[15] Microsoft Visual C++ 2010
[16] Open WATCOM C++
[0] None
How can I use Microsoft Visual Studio C++ 2013 as my compiler? Thanks a lot!!!!
Kind regards

Answers (1)

MSVC 2013 was probably released too late for R2012b to include in their mex build files. You might look at this FEX submission:

3 Comments

But it does not recognize the command "mbuild": >> mbuild -setup Undefined function 'mbuild' for input arguments of type 'char'.
did you solve this problem ?

Sign in to comment.

Categories

Asked:

on 12 May 2015

Commented:

on 7 Apr 2020

Community Treasure Hunt

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

Start Hunting!