天天看点

matlab、C++混合编程

Matlab中调用C/C++的程序、如何编写可供Matlab程序调用的C/C++程序:

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/R2012a/win64.html

Please choose your compiler for building MEX-files:

Would you like mex to locate installed compilers [y]/n? y

Select a compiler:

[1] Microsoft Visual C++ 2010 in f:\VS2010

[0] None

Compiler: 1

Please verify your choices:

Compiler: Microsoft Visual C++ 2010

Location: f:\VS2010

Are these correct [y]/n? y

***************************************************************************

Warning: MEX-files generated using Microsoft Visual C++ 2010 require

that Microsoft Visual Studio 2010 run-time libraries be

available on the computer they are run on.

If you plan to redistribute your MEX-files to other MATLAB

users, be sure that they have the run-time libraries.

***************************************************************************