Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Failure in MEX file
Posted:
Apr 25, 2012 4:52 PM
|
|
"Stiphu" wrote in message <jn92t6$mee$1@newscl01ah.mathworks.com>... > Hi there > > I'm using Matlab r2012a and try to compile the example "revord.c" ( I past the whole example at the end) in Visual Studio 2010. I get an error in the line > > "output_buf=mxCalloc(buflen, sizeof(char));" > > which says "error C2440: '=' : cannot convert from 'void *' to 'char *'". What am I doing wrong?
Did you make this part of a .cpp file? That's the error message I would expect from a C++ compiler, not a C compiler, since C++ requires explicit pointer casts. It compiles fine on my C compiler, but I get that expected error message when I try to compile it as a .cpp file.
James Tursa
|
|
|
|