-2

I'm working a mex solution that is structured like this:

I have a C# reader A, which is called by a C++/CLI project B, which is called by a mex project C, which is called from matlab. This is not my code, just something I'm supposed to get running.

B contains two functions that I can't access, first, the constructor: B::B(mxArray* data)

second, a regular function: mxArray* B::toMatlab(bool mode)

I tried replacing the mxArray* argument to the constructor with an int, which made the error go away, and similarly with the other function, so it seems like the function itself is accessible, but for some reason, I'm not allowed to use the type mxArray* as an argument.

I prefer not to include too many details about my code, but if there is anything that is relevant that I left out, please tell.

Ryan B
  • 3,364
  • 21
  • 35
Mårten
  • 231
  • 2
  • 14
  • Ways to get better answers: Show code. Not *your* proprietary code, but a smaller project that produces the same error. Make a copy of your whole project, take out anything you don't want leaked (i.e. change class names to give nothing away). See if you get the same compile error. Then take out anything else you can that leaves the error still happening. Finally, show us this "simple self-contained example" of the problem. – Ben Voigt Jan 28 '13 at 14:59
  • Also, tell us what version of Visual C++ you're using. – Ben Voigt Jan 28 '13 at 15:00

1 Answers1

0

The error help suggests that your issue is visibility (in .NET metadata) of the native types, and provides this link for more information and solutions:

Ben Voigt
  • 277,958
  • 43
  • 419
  • 720