I have MATLAB R2012b 32-bit installed and Visual Studio 2010 Professional (inc. SP1). I also had Microsoft Windows SDK 7.1 installed, which I have now removed as I thought it may be causing the issue with no luck.
here is the problem: My Visual Studio 2010 compiler does not show up on the list when I try to set up a default compiler for mex
>> 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? y
Select a compiler:
[1] Lcc-win32 C 2.4.1 in C:\PROGRA~2\MATLAB\R2012b\sys\lcc
[2] Microsoft Visual C++ 2005 SP1 in C:\LegacyApp\VisualStudio2005
[0] None
None of the few suggestions I found on my search have helped. I have put the \Microsoft Visual Studio 10.0\VC\bin directory in system path, tried copying "mspdb100.dll" from the "..\Microsoft Visual Studio 10.0\Common7\IDE\" to the "..\Microsoft Visual Studio 10.0\VC\bin\", and also removed Windows SDK 7.1 and repaired my VS2010 installation.
Any other recommendations? I am on 64-bit windows 7.