Re: MATLAB Compiler 4.6 Problems



Nick, the compiler Lcc C version 2.4.1 (included with MATLAB). This
is a C only
compiler; it does not work with C++, and mwArray is a C++ utility.

You probe with Microsoft Visual C/C++ (MSVC) Versions 6.0, 7.1, and
8.0.

Nick wrote:


When I try to compile a file from MATLAB into a stand alone C++
library using the command:

mcc -W cpplib:libmatrix -T compile:lib -v addmatrix.m
multiplymatrix.m eigenvalfn.m

I get the error message:

Error libmatrix.cpp: 146 syntax error; found `void' expecting `;'
Error libmatrix.cpp: 146 missing parameter type
Error libmatrix.cpp: 146 syntax error; found `&' expecting `)'
Error libmatrix.cpp: 146 skipping `&' `a' `,'
Error libmatrix.cpp: 147 syntax error; found `const' expecting `{'

Error libmatrix.cpp: 147 redeclaration of `mwArray' previously
declared at libmatrix.cpp 146
Error libmatrix.cpp: 147 syntax error; found `&' expecting `;'
Error libmatrix.cpp: 147 undeclared identifier `in1'
Error libmatrix.cpp: 147 illegal expression
Warning libmatrix.cpp: 147 Statement has no effect
Error libmatrix.cpp: 147 syntax error; found `mwArray' expecting
`;'

Error libmatrix.cpp: 147 undeclared identifier `in2'
Warning libmatrix.cpp: 147 Statement has no effect
Error libmatrix.cpp: 147 syntax error; found `)' expecting `;'
Error libmatrix.cpp: 147 illegal statement termination
Error libmatrix.cpp: 147 skipping `)'
Error libmatrix.cpp: 149 undeclared identifier `a'
Warning libmatrix.cpp: 153 Statement has no effect
Error libmatrix.cpp: 153 syntax error; found `void' expecting `;'
Error libmatrix.cpp: 153 illegal statement termination
Error libmatrix.cpp: 153 skipping `void'
Error libmatrix.cpp: 153 illegal expression
Error libmatrix.cpp: 153 syntax error; found `nargout' expecting
`)'

Error libmatrix.cpp: 153 too many errors

C:\PROGRA~1\MATLAB\R2007A\BIN\MEX.PL: Error: Compile of
'libmatrix.cpp' failed.

Error: An error occurred while shelling out to mbuild (error code =
2).
Unable to build executable.
??? Error executing mcc, return status = 1.

Does anyone know how I can fix this issue?

Thanks.

-Nick
.



Relevant Pages

  • MATLAB Compiler 4.6 Problems
    ... When I try to compile a file from MATLAB into a stand alone C++ ... 146 syntax error; found `void' expecting `;' ... Error libmatrix.cpp: 147 illegal statement termination ...
    (comp.soft-sys.matlab)
  • Re: and and or in case
    ... SyntaxError: compile error ... :41: syntax error, unexpected kEND, expecting $end ...
    (comp.lang.ruby)
  • Re: C MEX-file with header files
    ... its is still unable to compile due to lots of syntax errors. ... syntax error; found `typedef' expecting `;' ... invalid union field declarations ...
    (comp.soft-sys.matlab)
  • Re: flex+bison problem: syntax error that shouldnt be
    ... a syntax error - that's how the grammar is specified. ... I was expecting to get the behavior that you described but the ... compiled without specifying any flags, ... happen to know what went wrong with my code so that it could compile ...
    (comp.unix.programmer)
  • Problems running gnumex-compiled MySQL database connector
    ... Warning mysql.cpp: 100 possible usage of t before definition ... 177 syntax error; found `int' expecting `;' ...
    (comp.soft-sys.matlab)