Matlab Mex file compile

左心房为你撑大大i 提交于 2019-12-10 10:02:16

问题


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!


回答1:


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.




回答2:


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




回答3:


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




回答4:


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

See this page on Building MEX-Files for more information




回答5:


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



来源:https://stackoverflow.com/questions/16159970/matlab-mex-file-compile

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!