Re: MEX error: can't convert to mwSize



On Aug 13, 1:04 pm, "Christopher " <crohdenos...@xxxxxxx> wrote:
Hello, I wrote some MEX code a few months ago and switched
over to Visual Studio 2008 in the mean time.  I'm trying to
recompile my code, and I'm getting an error on the line (and
on other lines that take the dimensionality of an array as a
parameter):

plhs[1] = mxCreateCharArray(2,dimArray);

The error text is
error C2664: 'mxCreateCharArray_730': cannot convert
parameter 2 from 'int [2]' to 'const mwSize *'

Since this worked before, and I've seen example code doing
things the exact same way, I'm at a loss as to how to get
this code to work.

Any suggestions?

Does this work?

plhs[1] = mxCreateCharArray(2, (const mwSize *)&dimArray[0]);

I don't know why the first one doesn't work though.
.



Relevant Pages

  • MEX error: cant convert to mwSize
    ... I wrote some MEX code a few months ago and switched ... over to Visual Studio 2008 in the mean time. ... recompile my code, and I'm getting an error on the line (and ... I'm at a loss as to how to get ...
    (comp.soft-sys.matlab)
  • Re: MEX error: cant convert to mwSize
    ... Praetorian wrote in message ... over to Visual Studio 2008 in the mean time. ... things the exact same way, I'm at a loss as to how to get ...
    (comp.soft-sys.matlab)
  • Re: Letter Hunt Released!
    ... When I tried to autowalk to a Rous on about the third level, ... ...and Visual Studio open to the following line: ... The workaround for now is to not use walk mode until you ... If you can recompile the source, ...
    (rec.games.roguelike.misc)
  • Re: Error: 7 Out of Memory
    ... neither have Visual Studio of any sort installed. ... run the same company wide Windows Updater with all very similar if not ... it was showing the exact same symptoms as the problem PCs. ...
    (microsoft.public.vb.bugs)
  • Re: VS2005 build dependency bug?
    ... Not sure if this is a known bug in Visual Studio 2005, ... Rename A.h and A.cpp to B.h and B.cpp respectively, ... If I rebuild the solution, it doesn't recompile Main.cpp? ...
    (microsoft.public.vstudio.general)