I have implemented a complex mexFunction
using visual studio 2012 and successfully integrated it with Matlab. (lets call it mexFunctionA.mexw32
)
When I run this command in matlab command window, I get the expected results:
mexFunctionA("My1Argument", "My2Argument");
Now , I need to develop a mexFunctionB
that calls mexFunctionA
; mexFunctionB
is a simple as it can be.
The C code I´m trying (inside mexFunctionB.c
) is:
#include "mexFunctionA.mexw32"
(...)
static void mdlOutputs(SimStruct *S, int_T tid)
{
mexFunctionA("My1Argument", "My2Argument");
}
(...)
This line of code is not compiling.
The command line I am using is:
mex -v mexFunctionB.c -I'C:\patchToMexFunctionA' -L'C:\patchToMexFunctionA' 'mexFunctionA.mexw32'
So, here are the possible errors:
- The
#include
method is wrong. - The command line for compiling the code is wrong.
- It is not possible to do what I am planning to do.
- Something else.
Anyone knows how to fix it?