Use calllib with emx-array in argument

2 visualizzazioni (ultimi 30 giorni)
Romain bigourd
Romain bigourd il 17 Ott 2014
Commentato: Ryan Livingston il 20 Ott 2014
Dear All,
I craeted a dll with matlab coder 2013. the call of my fonction is :
void main(const emx_array_int32_T *data) My array of int is variable.
the loadlibrary is ok , the libfunctionview is ok too.
When i try a call lib i have the error : A structure is required.
I search about the way to create a emx_array_int32_T in matlab to send it to my DLL C++ function ...
Could you help me please if you have a solution ?
Thanks a lot !!
Romain
  2 Commenti
Geoff Hayes
Geoff Hayes il 17 Ott 2014
Romain - your main program must include an h file that would have the definition for the emx_array_int32_T type (else the code wouldn't compile).
Are you sure that this shouldn't be emxArray_int32_T instead?
Also, please list the steps that you are following to load the library and call your function. Include the lines of code that you have typed out in your script or in the MATLAB Command Window.
Ryan Livingston
Ryan Livingston il 20 Ott 2014
If you are trying to call the generated code from MATLAB, can you just generate a MEX function instead of a DLL? You would then be able to call that generated MEX function like any other MATLAB function.

Accedi per commentare.

Risposte (0)

Categorie

Scopri di più su MATLAB Coder in Help Center e File Exchange

Prodotti

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by