Use calllib with emx-array in argument

2 visualizaciones (últimos 30 días)
Romain bigourd
Romain bigourd el 17 de Oct. de 2014
Comentada: Ryan Livingston el 20 de Oct. de 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 comentarios
Geoff Hayes
Geoff Hayes el 17 de Oct. de 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 el 20 de Oct. de 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.

Iniciar sesión para comentar.

Respuestas (0)

Categorías

Más información sobre MATLAB Coder en Help Center y File Exchange.

Productos

Community Treasure Hunt

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

Start Hunting!

Translated by