3
votes

I know that Visual Studio Pro will allow you to compile mex files for MATLAB 2014b.

However I was wondering if anyone was able to use Visual Studio Express (which is free, as opposed to Pro which is not) to compile mex files? I tried the Windows SDK (recommended by mathworks), with no success.

Update: This is the error I get: A problem occurred while installing selected Windows SDK components. Installation of the "Microsoft Windows SDK for Windows 7" product has reported the following error: Please refer to Samples\Setup\HTML\ConfigDetails.htm

Only I can't find that file.

Details:

Windows 7

MATLAB 2014b

Things I Did So Far:

SDK 7.1, I tried installing this not sure if it did not install correctly or was not actually a solution (from here: http://www.mathworks.com/support/compilers/R2014b/index.html)

Download the 30 day trial of Visual Studio Pro which is working

2
If not necessarily MSVC, have you tried gnumex? I tested it successfully with R2012b, but not with 2014b. Note also, that despite what's their website says, R2014b runs still with MSVC 2005. This is also what mex.getCompilerConfigurations('c','Supported') gives. - embert
Note: Microsoft® Visual Studio® 2005 can be downloaded for free ( - as I think, did'nt check out myself). It does not support c99, just in case that is required. - embert
@embert Where can I find VS 2005? I went to the VS 2005 page (msdn.microsoft.com/en-us/library/ms950416.aspx) but the Visual Studios 2005 Express Edition link redirected to the 2013 edition (visualstudio.com/en-US/products/visual-studio-express-vs) - ErinGoBragh
Don't use a 10 year old compiler. Please! Try again with SDK 7.1 and check for certain MS bugs that might cause a problem. See here for supported compilers: mathworks.com/support/compilers/R2014b/index.html - chappjc
Try the MS hotfix from the answer I linked to above. This seems to be a common issue when certain updates. Also be sure select any options for 64-bir compilers if MATLAB is 64-bit. If all else fails, manually verify the SDK install worked. - chappjc

2 Answers

2
votes

Yes. I used to use that exact combination if I recall. Make sure you get the right version of it though. Share the actual problem and maybe we can work around it.

1
votes

This is another common issue with the Windows SDK 7.1 where it won't install if you have a newer Visual Studio 2010 runtime than version 10.0.30319, which is what it tries to install (you would think they would update the SDK installer!). You have to remove them before installing the SDK:

MsiExec.exe /passive /X{F0C3E5D1-1ADE-321E-8167-68EF0DE699A5}
MsiExec.exe /passive /X{1D8E6291-B0D5-35EC-8441-6616F567A0F7}

Then the SDK will install and you can reinstall the latest 2010 runtimes.

There is an identical issue with the old DirectX SDK (June 2010) and the solution is much the same.