How to compile a MEX file? Do I ne开发者_开发知识库ed to have any software installed?
Just compile the file with
mex yourmexfile.c
.
If you are using 32-bit Windows, you can use LCC which comes with MATLAB. However, the LCC shipped with MATLAB does not contain C++ functionality, so if you are using C++, please refer to MEX-files guide.
You can also compile mex files in an IDE. This is not that common when you are starting out but it can be convenient in some cases for more advanced programming. See the following Matlab docs for detailed instructions for Microsoft Visual Studio: http://www.mathworks.com/help/techdoc/matlab_external/f24338.html#f24571
精彩评论