Error using loadlibrary; failed to preprocess the input file. Error C1189.

After successfully building a .dll of my Simulink model (which includes an S-function), I tried to load the library in Matlab:
[notfound,warnings] = loadlibrary([libraryName,ext],...
fullfile('.',[modelname,'_ert_shrlib_rtw'],[modelname,'.h']),...
'mfilename',mprototypename,...
'includepath',fullfile(matlabroot,'simulink','include'));
but I got the following error message:
Error using loadlibrary (line 419)
Failed to preprocess the input file.
Output from preprocessor is:myModel.h
matlabroot\simulink\include\simstruc.h(285) : fatal error C1189: #error : Unrecognized use.
Any idea on how to solve this error?

3 件のコメント

Ivo Prah
Ivo Prah 2018 年 3 月 2 日
Have the same issue, any ideas?
Alan HASCOET
Alan HASCOET 2020 年 3 月 2 日
up up
Josh Philipson
Josh Philipson 2020 年 5 月 1 日
bump

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

質問済み:

2014 年 2 月 21 日

コメント済み:

2020 年 5 月 1 日

Community Treasure Hunt

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

Start Hunting!

Translated by