Use calllib with emx-array in argument

조회 수: 2 (최근 30일)
Romain bigourd
Romain bigourd 2014년 10월 17일
댓글: Ryan Livingston 2014년 10월 20일
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
Geoff Hayes
Geoff Hayes 2014년 10월 17일
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 2014년 10월 20일
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.

댓글을 달려면 로그인하십시오.

답변 (0개)

카테고리

Help CenterFile Exchange에서 MATLAB Coder에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by