在Matlab中编译c/c++代码需要安装mex

在Matlab中编译c/c++代码需要安装mex

 1 >> mex -setup
 2  
 3 Welcome to mex -setup.  This utility will help you set up  
 4 a default compiler.  For a list of supported compilers, see  
 5 http://www.mathworks.com/support/compilers/R2012b/win64.html 
 6  
 7 Please choose your compiler for building MEX-files: 
 8  
 9 Would you like mex to locate installed compilers [y]/n? y
10  
11 Select a compiler: 
12 [1] Microsoft Visual C++ 2010 in C:Program Files (x86)Microsoft Visual Studio 10.0 
13  
14 [0] None 
15  
16 Compiler: [1]
17 Please select from 0-1 
18 Compiler: 1
19  
20 Please verify your choices: 
21  
22 Compiler: Microsoft Visual C++ 2010  
23 Location: C:Program Files (x86)Microsoft Visual Studio 10.0 
24  
25 Are these correct [y]/n? y
26  
27 *************************************************************************** 
28   Warning: MEX-files generated using Microsoft Visual C++ 2010 require 
29            that Microsoft Visual Studio 2010 run-time libraries be  
30            available on the computer they are run on. 
31            If you plan to redistribute your MEX-files to other MATLAB 
32            users, be sure that they have the run-time libraries. 
33 *************************************************************************** 
34  
35  
36 Trying to update options file: C:UsersyangfanAppDataRoamingMathWorksMATLABR2012bmexopts.bat 
37 From template:              D:Program FilesMATLABMATLAB Production ServerR2012binwin64mexoptsmsvc100opts.bat 
38  
39 Done . . . 
40  
41 ************************************************************************** 
42   Warning: The MATLAB C and Fortran API has changed to support MATLAB 
43            variables with more than 2^32-1 elements.  In the near future 
44            you will be required to update your code to utilize the new 
45            API. You can find more information about this at: 
46            http://www.mathworks.com/help/techdoc/matlab_external/bsflnue-1.html 
47            Building with the -largeArrayDims option enables the new API. 
48 ************************************************************************** 
49  

解决问题:
Error: ARCH: Unsupported platform. 

参考文献:

http://blog.csdn.net/daiyuchao/article/details/5362140