Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
CMEX-problem with BORLANDC-compiler
Posted:
Jul 16, 1996 1:21 PM
|
|
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 ------------------------------------------------------------------------------
|
|
|
|