Problems converting MATLAB program to C program

Problems converting MATLAB program to C program

Post by sapirli » Wed, 30 Mar 2005 04:33:27


i. We are trying to convert a realy simple MATLAB program (here it
is:
function div3
% output the number 3
3)
to a stand alone C program using MATLAB automatic compiler.
Here is the command: mcc -m -v -I /usr/local/project -d
/usr/local/project div3

We get an error message, and we don't have an idea what it means and
what else can we do. Here is the message:

-----------------------------------------------------------------
-> Checking access to X display :0.0 . . .
If no response hit ^C and fix host or access control to host.
Otherwise, checkout any error messages that follow and fix . . .
-> Successful . . .
-----------------------------------------------------------------
Warning: Duplicate directory name: /usr/local/matlab14/toolbox/local.
Compiler version: 4.2 (R14SP2)
Parsing file "/usr/local/project/div3.m"
(Referenced from: "Compiler Command Line").
Parsing file "/usr/local/matlab14/toolbox/compiler/deploy/matlabrc.m"
(Referenced from: "Compiler Command Line").
Parsing file "/usr/local/matlab14/toolbox/compiler/dirname.m"
(Referenced from: "Compiler Command Line").
Parsing file "/usr/local/matlab14/toolbox/compiler/deploy/deployprint.m"
(Referenced from: "Compiler Command Line").
Parsing file "/usr/local/matlab14/toolbox/compiler/deploy/hgrc.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/matlabrc.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/strfun/str2double.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/matlabrc.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/general/usejava.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/matlabrc.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/iofun/fileparts.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/dirname.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/graphics/gcbf.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/deployprint.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/general/ispc.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/deployprint.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/graphics/print.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/deployprint.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/uitools/printdlg.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/deployprint.m").
Parsing file "/usr/local/matlab14/toolbox/matlab/iofun/tempname.m"
(Referenced from: "/usr/local/matlab14/toolbox/compiler/deploy/deployprint.m").
Generating file "/usr/local/project/div3_main.c".
Depfun main loop, iteration 1
Processing /usr/local/matlab14/toolbox/matlab/mcc.enc
1 item(s) added.
Processing /usr/local/matlab14/toolbox/database/mcc.enc
1 item(s) added.
Processing /usr/local/matlab14/toolbox/optim/mcc.enc
Processing dependencies...
0 item(s) added.
Depfun main loop, iteration 2
Processing dependencies...
0 item(s) added.
Processing include files...
2 item(s) added.
Processing exclude list...
0 item(s) removed. You can review the
/usr/local/project/mccExcludedFiles.log file for the list of functions
not included in the CTF archive.
Processing directories installed with MCR...
1628 item(s) removed. You can review the
/usr/local/project/mccExcludedFiles.log file for the list of functions
not included in the CTF archive.
0 item(s) added.
Generating MATLAB path for the compiled application...
Created 36 path i