MATLAB R2011a 如何安装编译器,如何生成exe文件?
如何生成可执行文件喃,我按照MATLABR2010b和以前版本的方法好像没法生成exe文件,安装了vc6.0的不行,安装vs2010的也不行,其他版本可以,为什么?请安装...
如何生成可执行文件喃,我按照MATLAB R2010b和以前版本的方法好像没法生成exe文件,安装了vc6.0的不行,安装vs2010的也不行,其他版本可以,为什么?
请安装过程如下:
安装MATLAB R2011a编译器:
1、
>> mex –setup
D:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: '–setup' not found.
如果出现这种情况,可以先将VC++6.0打开,然后过10秒钟再运行
2、
>> 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/R2011a/win32.html
Please choose your compiler for building 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\R2011a\sys\lcc
[2] Microsoft Visual C++ 2010 in D:\Program Files\Microsoft Visual Studio 10.0
[3] Microsoft Visual C++ 6.0 in D:\Program Files\Microsoft Visual Studio
[4] Open WATCOM C++ in d:\watcom-1.3
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 2010
Location: D:\Program Files\Microsoft Visual Studio 10.0
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.
***************************************************************************
Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2011a\mexopts.bat
From template: D:\PROGRA~1\MATLAB\R2011a\bin\win32\mexopts\msvc100opts.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.
**************************************************************************
>> mcc -B sgl readxls.m
??? Error using ==> mcc
Error: Unable to open file "sgl": No such file or directory.
P.S. 安装完成后,在试图操作步骤一,总是出现步骤一提示的错误,无法运行
已经可以了,找到了解决方案:mcc -m readxls.m -a A.xls
这样就可以生成可执行文件了 展开
请安装过程如下:
安装MATLAB R2011a编译器:
1、
>> mex –setup
D:\PROGRA~1\MATLAB\R2011A\BIN\MEX.PL: Error: '–setup' not found.
如果出现这种情况,可以先将VC++6.0打开,然后过10秒钟再运行
2、
>> 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/R2011a/win32.html
Please choose your compiler for building 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\R2011a\sys\lcc
[2] Microsoft Visual C++ 2010 in D:\Program Files\Microsoft Visual Studio 10.0
[3] Microsoft Visual C++ 6.0 in D:\Program Files\Microsoft Visual Studio
[4] Open WATCOM C++ in d:\watcom-1.3
[0] None
Compiler: 2
Please verify your choices:
Compiler: Microsoft Visual C++ 2010
Location: D:\Program Files\Microsoft Visual Studio 10.0
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.
***************************************************************************
Trying to update options file: C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R2011a\mexopts.bat
From template: D:\PROGRA~1\MATLAB\R2011a\bin\win32\mexopts\msvc100opts.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.
**************************************************************************
>> mcc -B sgl readxls.m
??? Error using ==> mcc
Error: Unable to open file "sgl": No such file or directory.
P.S. 安装完成后,在试图操作步骤一,总是出现步骤一提示的错误,无法运行
已经可以了,找到了解决方案:mcc -m readxls.m -a A.xls
这样就可以生成可执行文件了 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询