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: Failure in MEX file
Replies: 2   Last Post: Apr 26, 2012 8:52 AM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
James Tursa

Posts: 1,969
Registered: 8/5/09
Re: Failure in MEX file
Posted: Apr 25, 2012 4:52 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

"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



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

[Privacy Policy] [Terms of Use]

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