From: Amit on
Hi All,
I am new to Matlab so...
my question is about getting data to\from Matlab Compiled (to C++) Libraries.
I use mcc command to create several different compiled C++ libraries - Matlab Compiler produces several functions in a *.h file for every library which I include in my project and it works fine.
However, I wish to share data between the MCR and my code using SetMcrUserData\mclGetMcrData and others, but all these functions use variables of type mxArray wheras in the *.h file produced by the Matlab Compiler arguments are of type mwArray. Since I wish to share data returned by one library (mwArray type) with another library I can only use mxArray type to do so... therfore my question is how to transfer data between mwArray and mxArray ?

For clarity, I want to note here that I don't want to pass the returned mwArray from one library function to the other library function since I am dealing here with large amounts of data that serves as input only to a function that is called many times throughout the program.

Thanks,
Amit
From: Bruno Luong on
"Amit " <amitco77(a)gmail.com> wrote in message <hu2qu0$359$1(a)fred.mathworks.com>...
> Hi All,
> I am new to Matlab so...
> my question is about getting data to\from Matlab Compiled (to C++) Libraries.
> I use mcc command to create several different compiled C++ libraries - Matlab Compiler produces several functions in a *.h file for every library which I include in my project and it works fine.
> However, I wish to share data between the MCR and my code using SetMcrUserData\mclGetMcrData and others, but all these functions use variables of type mxArray wheras in the *.h file produced by the Matlab Compiler arguments are of type mwArray. Since I wish to share data returned by one library (mwArray type) with another library I can only use mxArray type to do so... therfore my question is how to transfer data between mwArray and mxArray ?
>
> For clarity, I want to note here that I don't want to pass the returned mwArray from one library function to the other library function since I am dealing here with large amounts of data that serves as input only to a function that is called many times throughout the program.
>
> Thanks,
> Amit

Why don' you just generate a plaint C library (as opposed to C++)?

Bruno