Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.matlab

Topic: CMEX-problem with BORLANDC-compiler
Replies: 0  

Advanced Search

Back to Topic List Back to Topic List  
Ivo Merks

Posts: 4
Registered: 12/7/04
CMEX-problem with BORLANDC-compiler
Posted: Jul 16, 1996 1:21 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

Hello,

I'm using a BORLANDC-compiler C++ 3.1 to compile cmex-files for Matlab
4.2.1.c on a Windows 3.11 system.
Compilation and linking is no problem, but when I try to execute the file,
Matlab generates an execution error and quits. The used cmex file is the
following:


#include <mex.h>

void mexFunction(int nlhs,
Matrix *plhs[],
int nrhs,
Matrix *prhs[])
{

if (nrhs!=1)
mexErrMsgTxt("Must ghave one input argument");
if (nlhs!=1)
mexErrMsgTxt("Must have one output argument");
if (mxIsComplex(prhs[0]))
mexErrMsgTxt("Input must be real");
mexPrintf("Hello world\n");
}

The execution error appears when the last error message is called, i.e
when a complex value is passed onto the function.

Has anyone come accross this problem and knows a solution?

Thanks very much
.

------------------------------------------------------------------------------
I.L.D.M. (Ivo) Merks, e-mail: ivo@dutnak2.tn.tudelft.nl tel:(31)(0)15-2782021
Acoustics Group, Department of Applied Physics home phone:(31)(0)15-2621645
Delft University of Technology, the Netherlands
------------------------------------------------------------------------------





Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.