I'm trying to compile a mex file to use socket connection within matlab. The problem is that it is always saying that I don't have sdk or compiler installed. But I have installed visual studio 2010 express, visual studio 2012 express, visual studio 2012 professional and nothing is changing the error. Also I have installed the sdk. Is there anything that I could try? The matlab version is R2012b and I'm using windows 7, 64 bits.
Thanks!
You are asking how to compile the mex-file directly on the Matlab's command line.
An alternative would be to compile the mex-file from Visual Studio. You might be interested in my answer to
No C++ compiler found in MATLAB using mex
You can try gnumex, which lets you access the mingw compilers on Windows. It works with mingw-w64 which is the 64 bit version of mingw. You have to install the mingw compiler suite, then run gnumex in Matlab to tell it where mingw is and set it up.
May be this link wil be useful for you http://support.brainvoyager.com/available-tools/52-matlab-tools-bvxqtools/339-how-to-get-a-64-bit-compiler-under-windows-to-use-with-matlab.html
I believe that Visual Studio 2012 is only supported on the latest R2013a. Use VS2010 for your MATLAB version.
In addition, the Express editions of VS do not contain 64-bit compilers. You need to either get the Professional edition, or download the free Windows SDK.
See the list of supported compilers for more information
Have you run
mex -setup
to tell MATLAB which compiler you want to use?See this page on Building MEX-Files for more information