为什么我用 snowlion1111的办法出错呢?
>> mcc -W main -T link:exe exe.m
Warning: File: c:\matlab6p5p1\exe\exe.m Line: 4 Column: 1
References to "plot" require the C/C++ Graphics Library when executing in stand-alone mode. You must specify -B sgl or -B sglcpp in order to use the C/C++ Graphics Library. Also, if using the -W option, you must specify either the mainhg or libhg wrapper type. A run-time error will occur if the C/C++ Graphics Library is not present when "plot" is called.
lcc preprocessor error: exe_main.c:15 Could not find include file "exe.h"
Error exe_main.c: 19 undeclared identifier `mlxExe'
Error exe_main.c: 19 invalid initialization type; found `int' expected `pointer to void function(int,pointer to pointer to incomplete struct mxArray_tag defined at C:\MATLAB6p5p1\extern\include\matrix.h 160,int,pointer to pointer to incomplete struct mxArray_tag defined at C:\MATLAB6p5p1\extern\include\matrix.h 160)'
Error exe_main.c: 19 initializer must be constant
Error exe_main.c: 19 undeclared identifier `_local_function_table_exe'
Warning exe_main.c: 19 assignment of pointer to struct _mexLocalFunctionTable to pointer to int
Error exe_main.c: 22 undeclared identifier `InitializeModule_exe'
Error exe_main.c: 22 invalid initialization type; found `int' expected `pointer to void function(void)'
Error exe_main.c: 22 initializer must be constant
Error exe_main.c: 22 undeclared identifier `TerminateModule_exe'
Error exe_main.c: 22 invalid initialization type; found `int' expected `pointer to void function(void)'
Error exe_main.c: 22 initializer must be constant
Error exe_main.c: 34 type error in argument 3 to `mclMain'; found `int' expected `pointer to void function(int,pointer to pointer to incomplete struct mxArray_tag defined at C:\MATLAB6p5p1\extern\include\matrix.h 160,int,pointer to pointer to incomplete struct mxArray_tag defined at C:\MATLAB6p5p1\extern\include\matrix.h 160)'
12 errors, 1 warnings
MBUILD.BAT: Error: Compile of 'exe_main.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 ==> C:\MATLAB6p5p1\toolbox\compiler\mcc.dll |