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 Center および File ExchangeMATLAB Coder についてさらに検索

製品

Community Treasure Hunt

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

Start Hunting!

Translated by