06.03.2015 (03.09.2015)
In this post I will provide an unofficial way to add Visual Studio 2015 support into Matlab 2015a/2014b. The same files may or may not also work with previous or upcoming versions.
(03.09.2015): Updated the ucrt path to reflect that of Visual Studio 2015 RTM — from 2015 RC.
In a default-installation of Matlab 2015a 64-bit, the option-files and scripts are located at one of the following directories:
C:\Program Files\MATLAB\R2015a\bin\win64\mexopts
C:\Program Files\MATLAB\MATLAB Production Server\R2015a\bin\win64\mexopts
Extract the .zip
package from below into the directory above.
VS2015 support for Matlab 2015a/2014b 64-bit
In a default-installation of Matlab 2015a 32-bit, the option-files and scripts are located at one of the following directories:
C:\Program Files (x86)\MATLAB\R2015a\bin\win32\mexopts
C:\Program Files (x86)\MATLAB\MATLAB Production Server\R2015a\bin\win32\mexopts
Extract the .zip
package from below into the directory above.
VS2015 support for Matlab 2015a/2014b 32-bit
To produce the given files for VS2015, I took the option files for VS2013
msvc2013.xml
msvcpp2013.xml
and copied them to
msvc2015.xml
msvcpp2015.xml
I then replaced strings as follows:
Description | From | To |
---|---|---|
Version | 12.0 |
14.0 |
Also version | 120 |
140 |
Name | 2013 Professional |
2015 |
Include path | INCLUDE="...;" |
INCLUDE="...;C:\Program Files (x86)\Windows Kits\10\Include\10.0.10150.0\ucrt; |
The added paths are absolute, since I do not know how to locate them otherwise. At this point the Windows Kit 10 and 8.1 seem to coexist, so the paths to 8.1 are not to be changed. For Visual Studio 2015 RTM, the ucrt version is 10150 (for RC it was 10056).
For the 32-bit versions, I made the following replacement:
Description | From | To |
---|---|---|
Library path | LIB="...;" |
LIB="...;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10150.0\ucrt\x86;" |
For the 64-bit versions, I made the following replacement:
Description | From | To |
---|---|---|
Library path | LIB="...;" |
LIB="...;C:\Program Files (x86)\Windows Kits\10\Lib\10.0.10150.0\ucrt\x64;" |
Of course, adding full support for a compiler cannot be as simple as that. This means that the above may or may not work for you, depending on which kind of things you will build. However, it does work for me, and it’s worth trying if you have no other option. If it does not work, then you will probably have linking errors, or crashing mex files, but you’ll find soon enough:p