matab程序轉換爲.exe可執行文件方法

1.寫好m文件後,按照下面的步驟執行,生成exe可執行程序,生成完成後,點擊exe文件即可執行程序。

>> 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\R2010b\sys\lcc
[2] Microsoft Visual C++ 2008 SP1 in D:\Program Files\Microsoft Visual Studio 9.0
 
[0] None
 
Compiler: 2
 
Please verify your choices:
 
Compiler: Microsoft Visual C++ 2008 SP1 
Location: D:\Program Files\Microsoft Visual Studio 9.0
 
Are these correct [y]/n? y
 
***************************************************************************
  Warning: MEX-files generated using Microsoft Visual C++ 2008 require
           that Microsoft Visual Studio 2008 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.
***************************************************************************
 
Trying to update options file: C:\Users\liuyong_wh\AppData\Roaming\MathWorks\MATLAB\R2010b\mexopts.bat
From template:              D:\PROGRA~1\MATLAB\R2010b\bin\win32\mexopts\msvc90opts.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/en/data/1-5C27B9/?solution=1-5C27B9
           Building with the -largeArrayDims option enables the new API.
**************************************************************************
 
>> 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\R2010b\sys\lcc
[2] Microsoft Visual C++ 2008 SP1 in D:\Program Files\Microsoft Visual Studio 9.0
 
[0] None
 
Compiler: 2
 
Please verify your choices:
 
Compiler: Microsoft Visual C++ 2008 SP1 
Location: D:\Program Files\Microsoft Visual Studio 9.0
 
Are these correct [y]/n? y
 
****************************************************************************
  Warning: Applications/components generated using Microsoft Visual Studio  
           2008 require that the Microsoft Visual Studio 2008 run-time      
           libraries be available on the computer used for deployment.      
           To redistribute your applications/components, be sure that the   
           deployment machine has these run-time libraries.                 
****************************************************************************
 
Trying to update options file: C:\Users\liuyong_wh\AppData\Roaming\MathWorks\MATLAB\R2010b\compopts.bat
From template:              D:\PROGRA~1\MATLAB\R2010b\bin\win32\mbuildopts\msvc90compp.bat
 
Done . . .
 
>> mcc  -m Monte_Carlo_Realibity.m

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章