Use calllib with emx-array in argument

1 view (last 30 days)
Romain bigourd
Romain bigourd on 17 Oct 2014
Commented: Ryan Livingston on 20 Oct 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 Comments
Geoff Hayes
Geoff Hayes on 17 Oct 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 on 20 Oct 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.

Sign in to comment.

Answers (0)

Categories

Find more on MATLAB Coder in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!