CATIA-Systems / FMIKit-Simulink

Import and export Functional Mock-up Units with Simulink
Other
157 stars 51 forks source link

S-function compilation of imported FMU fails #260

Closed CG-git closed 3 years ago

CG-git commented 3 years ago

Hello, Using Matlab R2019b and FMIKit 2.9 I loaded a CS-FMU (created with Dymola 2021x) which contains a binary (win64) and source code. Enabling "Use source code" and hitting OK or Apply the following messages appear in the Matlab Command Window:

Compiling S-function sfun_FMU Failed to compile S-function MEX cannot find library 'shlwapi', specified with the -l option. MEX searched for a file with one of the following names: libshlwapi.a shlwapi.lib libshlwapi.lib Verify the library name is correct. If the library is not on the existing path, specify the path with the -L option.

I am using MinGW64 6.3 for MEX. The library shlwapi.lib exists in my Matlab path C:\Program Files\MATLAB\R2019b\sys\lcc64\lcc64\lib64. "Use source code" is mandatory for me, because finally I want to generate it to a real-time target.

I cannot allocate the problem's source. Is it related to FMIKit? Is there a workaround maybe?

I am not allowed to upload the FMU.

CG-git commented 3 years ago

Was related to MinGW apparently. Using Visual Studio 2019 it works.