我在转换m文件变成单独可执行文件的时候,总是出错。比如
mcc -mv magicsquare.m
但是在编译后出现
Compiler version: 4.0 (R14)
Parsing file "d:\matlab7\work\magicsquare.m"
(Referenced from: "Compiler Command Line").
Parsing file "d:\matlab7\toolbox\compiler\deploy\matlabrc.m"
(Referenced from: "Compiler Command Line").
Parsing file "d:\matlab7\toolbox\compiler\dirname.m"
(Referenced from: "Compiler Command Line").
Parsing file "d:\matlab7\toolbox\matlab\elmat\magic.m"
(Referenced from: "d:\matlab7\work\magicsquare.m").
Parsing file "d:\matlab7\toolbox\matlab\strfun\str2num.m"
(Referenced from: "d:\matlab7\work\magicsquare.m").
Parsing file "d:\matlab7\toolbox\compiler\deploy\hgrc.m"
(Referenced from: "d:\matlab7\toolbox\compiler\deploy\matlabrc.m").
Parsing file "d:\matlab7\toolbox\matlab\strfun\str2double.m"
(Referenced from: "d:\matlab7\toolbox\compiler\deploy\matlabrc.m").
Parsing file "d:\matlab7\toolbox\matlab\general\usejava.m"
(Referenced from: "d:\matlab7\toolbox\compiler\deploy\matlabrc.m").
Parsing file "d:\matlab7\toolbox\matlab\iofun\fileparts.m"
(Referenced from: "d:\matlab7\toolbox\compiler\dirname.m").
Warning: No matching builtin function available for D:\MATLAB7\toolbox\simulink\simulink\set_param.bi
Generating file "magicsquare_main.c".
Depfun main loop, iteration 1
Processing D:\MATLAB7\toolbox\matlab\mcc.enc
1 items added
Processing dependencies...
0 items added
Depfun main loop, iteration 2
Processing dependencies...
0 items added
Processing include files...
2 items added.
Processing exclude list...
0 items removed.
Processing installed directories...
589 items removed.
Generating MATLAB path...
Created 33 path items.
Depfun main loop converged in 2 iterations, total number of files = 7
Generating file "magicsquare_mcc_component_data.c".
Executing command: mbuild -O -v -output 'magicsquare' 'magicsquare_main.c' 'magicsquare_mcc_component_data.c' -link exe
This is mbuild Copyright 1984-2004 The MathWorks, Inc.
-> Default options filename found in C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14
----------------------------------------------------------------
-> Options file = C:\Documents and Settings\Administrator\Application Data\MathWorks\MATLAB\R14\compopts.bat
-> COMPILER = cl
-> Compiler flags:
COMPFLAGS = -c -Zp8 -G5 -GX -W3 -nologo
OPTIMFLAGS = -O2 -DNDEBUG
DEBUGFLAGS = -Zi -Fd"magicsquare.pdb"
arguments =
Name switch = /Fo
-> Pre-linking commands =
-> LINKER = link
-> Link directives:
LINKFLAGS = kernel32.lib user32.lib gdi32.lib advapi32.lib oleaut32.lib ole32.lib /LIBPATH:"D:\MATLAB7\extern\lib\win32\microsoft\msvc60" /nologo mclmcrrt.lib
LINKFLAGSPOST =
Name directive = "/out:magicsquare.exe"
File link directive =
Lib. link directive =
Rsp file indicator = @
-> Resource Compiler = rc /fo ".res"
-> Resource Linker =
----------------------------------------------------------------
--> "cl -c -Zp8 -G5 -GX -W3 -nologo /Fomagicsquare_main.obj -ID:\MATLAB7\extern\include -ID:\MATLAB7\simulink\include -O2 -DNDEBUG magicsquare_main.c"
magicsquare_main.c
--> "cl -c -Zp8 -G5 -GX -W3 -nologo /Fomagicsquare_mcc_component_data.obj -ID:\MATLAB7\extern\include -ID:\MATLAB7\simulink\include -O2 -DNDEBUG magicsquare_mcc_component_data.c"
magicsquare_mcc_component_data.c
Contents of 1365_tmp.rsp:
magicsquare_main.obj magicsquare_mcc_component_data.obj
--> "link "/out:magicsquare.exe" kernel32.lib user32.lib gdi32.lib advapi32.lib oleaut32.lib ole32.lib /LIBPATH:"D:\MATLAB7\extern\lib\win32\microsoft\msvc60" /nologo mclmcrrt.lib @1365_tmp.rsp "
--> "if exist _lib1365.def del _lib1365.def"
最后,那个文件虽然生成了magicsquare.exe,但是没有办法执行,执行时候出现错误:mclmcrrt70.dll文件找不到错误啊,请教各位?
我的信箱:chenguang@ahut.edu.cn