CATIA-Systems / FMIKit-Simulink

Import and export Functional Mock-up Units with Simulink
Other
161 stars 54 forks source link

Error in FMU generation using slbuild command #393

Open CodeSinoj opened 1 year ago

CodeSinoj commented 1 year ago

While using FMIKit 3.0, an error is generated by the file D\FMIKit30\rtwsfcnfmi\sfcnmei.tlc Line: 258 Column: 4. Undefined identifier LoadBinaryMEX

The platform in x64-Windows10 and the CMake version is 3.25.1 from https://cmake.org/download/ and Visual Studio 17 2022 is used during the build, slbuild produces warnings:

Warning: 'Visual Studio 17 2022' is not a valid enumeration choice for data type 'RTWOptions_EnumType__rtwsfcnfmi_1CMakeGenerator'.

In stf2target (line 82) In RTW.TargetBrowser/uploadTarget In targetBrowserCloseCB In rtwprivate (line 16) Warning: 'Visual Studio 17 2022' is not a valid enumeration choice for data type 'RTWOptions_EnumType__rtwsfcnfmi_1CMakeGenerator'. In stf2target (line 82) In configset.dialog.HTMLView/apply

and errors:

TLC code generation complete.

Error: File: D:\FMIKit30\rtwsfcnfmi\sfcnmei.tlc Line: 74 Column: 29 Undefined identifier LoadBinaryMEX Main program: ==> [00] D:\FMIKit30\rtwsfcnfmi\sfcnmei.tlc:(74)

Error: File: D:\FMIKit30\rtwsfcnfmi\sfcnmei.tlc Line: 74 Column: 29 Values of NULL type cannot be expanded Main program: ==> [00] D:\FMIKit30\rtwsfcnfmi\sfcnmei.tlc:(74)

Build Summary

Top model targets built:

Model Action Rebuild Reason

sldemo_bounce Failed Code generation information file does not exist.

0 of 1 models built (0 models already up to date) Build duration: 0h 0m 6.022s Error evaluating 'PostLoadFcn' callback of block_diagram 'sldemo_bounce'. Callback string is 'slbuild(gcs)' Caused by: Error: File: D:\FMIKit30\rtwsfcnfmi\sfcnmei.tlc Line: 258 Column: 4 Undefined identifier LoadBinaryMEX

Note: slbuild works fine with Visual Studio 16 2019

sldemo_bounce.zip