Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: mex: Compile error with mxArray
Date: Thu, 13 Aug 2009 13:40:19 +0000 (UTC)
Organization: The MathWorks, Inc.
Lines: 24
Message-ID: <h61543$anv$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-03-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1250170819 11007 172.30.248.38 (13 Aug 2009 13:40:19 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 13 Aug 2009 13:40:19 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 1932693
Xref: news.mathworks.com comp.soft-sys.matlab:563015


Hi,

Compiling C functions with Lcc in Matlab is have the following (classic) error:

Error sparsesvd_partialeig_matlab.c: 86  operands of = have illegal types `pointer to incomplete struct mxArray_tag defined at C:\MATLAB6p1\extern\include\matrix.h 154' and `int' 

for the last line of this code: 

mxArray *output[3],*input[4];

mexEvalString("options.disp=0;"); // for use in calling Matlab function eigs	
mexEvalString("options.maxit=500;"); // for use in calling Matlab function eigs	
input[0] = mxCreateDoubleMatrix(n,n,mxREAL); // for use in calling Matlab function eigs
input[1] = mxCreateDoubleMatrix(1,1,mxREAL);
input[2]= mxCreateString("la");
input[3]= mexGetVariable("caller","options");

of course I have included mex.h in the header file.

Any idea?

Thanks a lot,

David