0

I have a visual studio project that creating a mex function. The solution has One project with one cpp file that is configured to generate a mex32/64 file.

I would like to fake a matlab call to this function for debugging/testing/validating. My goal is to create another project, console application that calls this mexfuntion. Has anyone ever done it? What are the parameters I should call to mexfunction with? How does the main() in the console application should look like?

Mercury
  • 1,886
  • 5
  • 25
  • 44
  • 2
    A mex file is just a DLL (on Windows) with a `.mexw` extension. You should be able to call the function it contains as you would call a function in any other DLL. I expect your favourite search engine will find examples for you to follow. – High Performance Mark Jul 04 '14 at 06:40
  • 1
    You could always debug it in Visual Studio via MATLAB. [See this related question](http://stackoverflow.com/q/23653347/2065121) for details. – Roger Rowland Jul 04 '14 at 06:56
  • @RogerRowland, I know but it is very clumsy. I would like a test project to test the dll functionality. – Mercury Jul 04 '14 at 16:42

0 Answers0