1安装mcc mbuild -setup Please choose your compiler for building standalone MATLAB applications: Would you like mbuild to locate installed compilers [y]/n? y Select a compiler: [1] Lcc-win32 C 2.4.1 in D:\PROGRA~1\MATLAB\R2009bb\sys\lcc [0] None Compiler: 1 Please verify your choices: Compiler: Lcc-win32 C 2.4.1 Location: D:\PROGRA~1\MATLAB\R2009bb\sys\lcc Are these correct [y]/n? y Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2009b\compopts.bat From template: D:\PROGRA~1\MATLAB\R2009bb\bin\win32\mbuildopts\lcccompp.bat Done . . . 2..安装mex mex -setup Please choose your compiler for building external interface (MEX) files: Would you like mex to locate installed compilers [y]/n? y Select a compiler: [1] Lcc-win32 C 2.4.1 in D:\PROGRA~1\MATLAB\R2009bb\sys\lcc [0] None Compiler: 1 Please verify your choices: Compiler: Lcc-win32 C 2.4.1 Location: D:\PROGRA~1\MATLAB\R2009bb\sys\lcc Are these correct [y]/n? y Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2009b\mexopts.bat From template: D:\PROGRA~1\MATLAB\R2009bb\bin\win32\mexopts\lccopts.bat Done . . . ************************************************************************** Warning: The MATLAB C and Fortran API has changed to support MATLAB variables with more than 2^32-1 elements. In the near future you will be required to update your code to utilize the new API. You can find more information about this at: http://www.mathworks.com/support/solutions/data/1-5C27B9.html?solution=1-5C27B9 Building with the -largeArrayDims option enables the new API. ************************************************************************** 3 转化成exe 、c代码 mcc -B sgl example6_3_3.m 网上都解决方案的。 特别注意了:文件应该放在英文目录下操作如 放在 d:\try 文件夹中。就不会出问题。 |