【发布时间】:2011-11-10 10:39:08
【问题描述】:
我正在尝试使用 Deploytool 在 Matlab 中创建一个 Windows 独立应用程序,以便为我的项目生成一个 .exe 文件。 (这里提到:http://www.mathworks.co.uk/products/demos/compiler/deploytool/index.html)。
问题是当我在 Deploytool 中添加我的文件并按下 Build 按钮时,它要求我使用 mbuild -setup 来设置我的编译器。当我这样做时,我得到的唯一选择是:
Would you like mbuild to locate installed compilers [y]/n? n
Select a compiler:
[1] Microsoft Visual C++ 2005 SP1
[2] Microsoft Visual C++ 2008 Express
[3] Microsoft Visual C++ 2008 SP1
[0] None
当我选择任何一个时,我会得到这些:
*The default location for Microsoft Visual C++ 2008 Express compilers is C:\Program Files (x86)\Microsoft Visual Studio 9.0,
but that directory does not exist on this machine.
Please enter the location of your compiler:*
我在构建时也收到以下错误:
*Could not find the compiler "cl" on the DOS path.
Use mbuild -setup to configure your environment properly.
C:\PROGRA~1\MATLAB\R2010A\BIN\MEX.PL: Error: Unable to locate compiler.
Error: An error occurred while shelling out to mbuild (error code = 2).
Unable to build executable.*
你能帮我解决这个问题吗?
提前致谢。
【问题讨论】:
-
您的机器上安装了哪些编译器?如果让“mbuild -setup”定位已安装的编译器会发生什么?
-
让它自行设置时没有选项。我应该如何安装编译器?我需要专门为 matlab 获取它们吗?
-
你需要安装一个编译器,我相信Visual Studio Express编译器可以从微软免费获得。
标签: matlab matlab-deployment matlab-compiler