求助:如何将m文件编译成exe文件
我现在有两个m文件,一个是主文件,另一个是被调用的函数文件,请问怎么将他们编译成exe文件啊?在另一台未装matlab的机器上如何使用呢?我用mcc -B sgl 命令编译主文件时,报错:
Error cloth_scope.c: 262syntax error; found `end of input' expecting `}'
1 errors, 2 warnings
MBUILD.BAT: Error: Compile of 'cloth_scope.c' failed.
??? Error using ==> mbuild
Unable to complete successfully
??? Error: An error occurred while shelling out to mbuild (error code = 1).
Unable to build executable (specify the -v option for more information).
Error in ==> D:\MATLAB6p5p1\toolbox\compiler\mcc.dll
这是怎么回事啊?程序在matlab中运行一切正常啊!
[ 本帖最后由 Leighton_buaa 于 2006-11-2 11:39 编辑 ] 编译可执行文件的命令是:mcc -B sgl 主文件名(*.m)调用的文件名(*.m)
还可以加上调试信息,其格式如下:mcc -B sgl -g 主文件名 调用的文件名 原帖由 anneyholly 于 2006-11-2 16:25 发表
编译可执行文件的命令是:mcc -B sgl 主文件名(*.m)调用的文件名(*.m)
还可以加上调试信息,其格式如下:mcc -B sgl -g 主文件名 调用的文件名
还是有如下的报错:found `end of input' expecting `}'
这应该是说在编译后的文件cloth_scope.c中的182行有错,找不到输入的结束,可在matlab中运行是对的阿!
Error cloth_scope.c: 182syntax error; found `end of input' expecting `}'
Error cloth_scope.c: 182syntax error; found `end of input' expecting `}'
Error cloth_scope.c: 182syntax error; found `end of input' expecting `}'
Error cloth_scope.c: 182syntax error; found `end of input' expecting `}'
Warning cloth_scope.c: 182missing return value
Error cloth_scope.c: 182syntax error; found `end of input' expecting `}'
Warning cloth_scope.c: 24static `array 3 of double _array2_' is not referenced
Warning cloth_scope.c: 22static `array 3 of double _array1_' is not referenced
Warning cloth_scope.c: 20static `array 3 of double _array0_' is not referenced
5 errors, 5 warnings
MBUILD.BAT: Error: Compile of 'cloth_scope.c' failed.
??? Error using ==> mbuild
Unable to complete successfully
??? Error: An error occurred while shelling out to mbuild (error code = 1).
Unable to build executable (specify the -v option for more information).
Error in ==> D:\MATLAB6p5p1\toolbox\compiler\mcc.dll 这得需要英文翻译了 原帖由 Leighton_buaa 于 2006-11-1 22:43 发表
我现在有两个m文件,一个是主文件,另一个是被调用的函数文件,请问怎么将他们编译成exe文件啊?在另一台未装matlab的机器上如何使用呢?
我用mcc -B sgl 命令编译主文件时,报错:
Error cloth_scope.c: 262 ...
先保证编译环境没有问题(即mbuild和mex都设置好),然后搜索一下论坛如何打包
页:
[1]