Using MATLAB Compiler Runtime (mcr) i have created dll of the a matlab file. I can use the function and pass all the variables to the function easily and without any problem.
My problem is when I have a class with "mwArray" as a variable in it, like:
#include <samplemmfile.h>
#include <mclmcr.h>
#include <stdio.h>
class MModel{
int x;
mwArray y;
};
and then I create an object from it, application in run-time throws an exception in "mclcppclass.h" header file:
Access violation executing location 0X0000000000.
It would be quite expensive to wrap and convert all input files to the matlab format every time that I want to call those functions, therefore was wondering is there any solution for this problem?
Thanks,
mclInitializeApplication
) and library (libXXXInitialize
) before using any of it? You have to be careful about the order of how things are constructed when you have classes.. – Amro