简体   繁体   中英

Matlab Mex file compile

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 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.

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

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

Have you run mex -setup to tell MATLAB which compiler you want to use?

See this page on Building MEX-Files for more information

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM