loadlibrary does not find a function

1 回表示 (過去 30 日間)
Michael Povolotskyi
Michael Povolotskyi 2019 年 11 月 15 日
回答済み: Jan 2023 年 9 月 13 日
Hello, I'm trying to load a C libary into Matlab.
The case is very simple.
The header file libwrapper.h:
void call2(int)
The C file wrapper.C
#include "libwrapper.h"
void call2(int t)
{
}
The library is built as follows:
gcc -shared ./wrapper.c -o libwrapper.so
I checked with the nm command, the symbol call2 is in the library.
If I call in Matlab loadlibrary('libwrapper.so'), matlab does not find the function call2 (I get a warning)
What am I doing wrong?
  2 件のコメント
Michael Povolotskyi
Michael Povolotskyi 2019 年 11 月 15 日
Additional info:
I tried with an older release (2017a) and it worked well.
Michael Povolotskyi
Michael Povolotskyi 2019 年 11 月 15 日
Now it works for me with 2019a release. I think the problem was with some environment variables of me session.
Sorry for a false alarm.

サインインしてコメントする。

回答 (1 件)

Jan
Jan 2023 年 9 月 13 日
Dear Michael,
I may have the same problem, but do not know how to make it work. How did you resolved it?
Thank you very much.
Kind regards, Jan.

カテゴリ

Help Center および File ExchangeMATLAB Coder についてさらに検索

製品


リリース

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by