フィルターのクリア

Error when trying to load .dll

4 ビュー (過去 30 日間)
Panagiotis Bountouris
Panagiotis Bountouris 2019 年 4 月 14 日
回答済み: Panagiotis Bountouris 2019 年 4 月 15 日
I try to load the PID_win64.dll library shown in figure below but I get this error:
The headers are placed in the folder PID_ert_shrlib_rtw.

採用された回答

Panagiotis Bountouris
Panagiotis Bountouris 2019 年 4 月 15 日
Thank you all for the answers. I finally found out how to sucessfully load the library. Please see the script line below:
The last 'includepath' refers to necessary matlab setup directory include files.
coder.loadlibrary('PIDdll_win64', '.\PIDdll_ert_shrlib_rtw\PIDdll.h',...
'includepath','.\PIDdll_ert_shrlib_rtw','includepath',fullfile(matlabroot,'simulink','include'));

その他の回答 (1 件)

Guillaume
Guillaume 2019 年 4 月 14 日
You probably need to add an 'IncludePath' parameter to your loadlibrary call to specify which directory the include file rtw_continuous.h resides in
load_library('PID_Win64', 'PID.h', 'addheader', 'PID_private', 'IncludePath', 'path\to\include\directory')
  2 件のコメント
Panagiotis Bountouris
Panagiotis Bountouris 2019 年 4 月 14 日
Dear Guillaume
Thank you for you answer. I tried the line below but I had another error:
>> loadlibrary('PIDdll_win64', 'PIDdll', 'addheader', 'rtwtypes','addheader', 'PIDdll_private','addheader', 'PIDdll_types', 'includepath', 'C:\Users\wsb15162\Documents\PhD\Generic model\Working now\new_attempt\new_case\PIDdll_ert_shrlib_rtw')
Error using regexp
The 'STRING' input must be either a char row vector, a cell array of char row
vectors, or a string array.
Error in loadlibrary
Error in loadlibrary
PS: I have atatched all the files.
Walter Roberson
Walter Roberson 2019 年 4 月 14 日
Historically it has been common for those processes to fail when there is a space in a directory name.

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

カテゴリ

Help Center および File ExchangeStartup and Shutdown についてさらに検索

製品


リリース

R2018b

Community Treasure Hunt

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

Start Hunting!

Translated by