How to work with loadlibrary and C header files

조회 수: 2 (최근 30일)
Bram Surewaard
Bram Surewaard 2020년 8월 8일
댓글: Bram Surewaard 2020년 8월 10일
Hey,
I know that this question is only down to me not knowing the basics of working with c so I hoop that somebody is able to help me with this.
For a project I have to create a struct in c and then use this stuct to load it into matlab using loadlibrary and this example: https://nl.mathworks.com/matlabcentral/answers/41648-converting-matlab-struct-to-c-struct-and-access-byte-data
However I have no idea how to even create the right files in the c language and I cant find any information on this online.
I have attached the c file as a txt file to this question.
Any help or tips are welcome as I am completely stuck and have no idea how to fix this problem.
Thanks!
  댓글 수: 5
Mohammad Sami
Mohammad Sami 2020년 8월 10일
You need to compile your code as a 64 bit dll, otherwise you can't use it with MATLAB.
Bram Surewaard
Bram Surewaard 2020년 8월 10일
yeah i tried doing that with gcc -m64 however I still get the same error

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

답변 (0개)

카테고리

Help CenterFile Exchange에서 Data Type Identification에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by