FMIKit-Simulink
FMIKit-Simulink copied to clipboard
Error when Building a simscape model (MATLAB R2020b)
I got this error when I build a model and exporting the FMU file from Simulink, related to grtfmilib.tlc file: Line: 76 Column: 24 Undefined identifier Units %assign unit = Units.Unit[port.UnitIdx].ASCIIEscapedUnitExpr I updated the file with edited one on Jul 13, 2019 and got this error, related to grtfmixml.tlc Line: 240 Column: 35 Undefined identifier vr
Can you share a model to reproduce the problem?
I am getting the same error, do you have any solution for it ? grtfmilib.tlc Line: 76 Column: 24 Undefined identifier Units
thanks
Hello, Actually I am still getting the same error, I am trying to generate the FMU File from another Software. If I find out anything I will write.
This should be fixed by #221
I get a build error when using MinGW cmakefiles with grtfmi.tlc on win10/64-bit. The same process works well with models without any simscape components. Is there a way to resolve this issue? (Edit: If I switch over to MSVS17, then I do not get this error - but I would like to continue to use MinGW).
Listed below is partial error log.
libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x37): undefined reference to 'mc_VWnvos7Q548uVH7p0208jN' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x55): undefined reference to 'mc_kM_Y9u9U2F_Cf9sWAtmMMu' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0xda): undefined reference to 'mc_get_csparse_rect_la' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x201): undefined reference to 'mc_VWnvos7Q548uVH7p0208jN' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x21f): undefined reference to 'mc_kM_Y9u9U2F_Cf9sWAtmMMu' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x402): undefined reference to 'mc_kM_Y9u9U2F_Cf9sWAtmMMu' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x526): undefined reference to 'pm_FhqtSrxlPotrcypQHJ9Dcq' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x5aa): undefined reference to 'mc__5C6m_ZyP9_NYekcJCEULM' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x60b): undefined reference to 'mc__8x7kz_627_gXDli_FJo22' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x617): undefined reference to 'mc__aNO1s5qwzt6fXwft5YgCz' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x635): undefined reference to 'mc_kM_Y9u9U2F_Cf9sWAtmMMu' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x6d2): undefined reference to 'mc_VWnvos7Q548uVH7p0208jN' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x75c): undefined reference to 'pm_VYooJBURCwKrVu6RXzQZ_5' libssc_sli.a(ssc_sli_9abcdb7f.c.obj):ssc_sli_9abcdb7f.c:(.text+0x78c): undefined reference to 'pm_VYooJBURCwKrVu6RXzQZ_5' libssc_sli.a(ssc_sli_c7dda239.c.obj):ssc_sli_c7dda239.c:(.text+0x8ac): undefined reference to 'mc_VWloU5QD6gpaXeK8lmytFA' libssc_sli.a(ssc_sli_c7dda239.c.obj):ssc_sli_c7dda239.c:(.text+0x8c0): undefined reference to 'mc_VWloU5QD6gpaXeK8lmytFA' libssc_sli.a(ssc_sli_c7dda239.c.obj):ssc_sli_c7dda239.c:(.text+0x8d4): undefined reference to 'mc_VWloU5QD6gpaXeK8lmytFA' libssc_sli.a(ssc_sli_c7dda239.c.obj):ssc_sli_c7dda239.c:(.text+0xc77): undefined reference to 'mc_VWloU5QD6gpaXeK8lmytFA' libssc_sli.a(ssc_sli_c7dda239.c.obj):ssc_sli_c7dda239.c:(.text+0xc87): undefined reference to 'mc_VWloU5QD6gpaXeK8lmytFA' libssc_sli.a(ssc_sli_c7dda239.c.obj):ssc_sli_c7dda239.c:(.text+0xcb6): more undefined references to 'mc_VWloU5QD6gpaXeK8lmytFA' follow collect2.exe: error: ld returned 1 exit status CMakeFiles\Subsystem.dir\build.make:238: recipe for target 'Subsystem.dll' failed mingw32-make.exe[2]: *** [Subsystem.dll] Error 1 CMakeFiles\Makefile2:191: recipe for target 'CMakeFiles/Subsystem.dir/all' failed mingw32-make.exe[1]: *** [CMakeFiles/Subsystem.dir/all] Error 2 Makefile:101: recipe for target 'all' failed mingw32-make.exe: *** [all] Error 2 The call to grtfmi_make_rtw_hook, during the after_make hook generated the following error: Failed to build FMU
The build process will terminate as a result. Caused by: Failed to build FMU Component:Simulink | Category:Build error ??? Subsystem build failed
Does the problem still exist with v3.0-alpha.1?
i have the similar error as yours.
and the precondition is also the similar: simulink model with simscape blocks, but I use Unix makefile other than MinGW .
some of the error info is below:
libssc_sli.a(ssc_sli_77063d8b.c.obj):ssc_sli_77063d8b.c:(.text+0x966): undefined reference to mc_tLxHiRii5tbHWjrunaI2i1' libssc_sli.a(ssc_sli_77063d8b.c.obj):ssc_sli_77063d8b.c:(.text+0x9fc): undefined reference to
mc_lya_e_YIJ3zOEAoJRDe0c1'
libssc_sli.a(ssc_sli_77063d8b.c.obj):ssc_sli_77063d8b.c:(.text+0xa43): undefined reference to pm_06dTzOwkhN7oGBM_7J2hK1' libssc_sli.a(ssc_sli_77063d8b.c.obj):ssc_sli_77063d8b.c:(.text+0xab9): undefined reference to
ne_04nTccAGGfTttdxxhMsLp_'
libssc_sli.a(ssc_sli_7a618260.c.obj):ssc_sli_7a618260.c:(.text+0x13c): undefined reference to mc_Rhhlgu4QH_WTKd_5kpe4I2' libssc_sli.a(ssc_sli_7a618260.c.obj):ssc_sli_7a618260.c:(.text+0x14c): undefined reference to
mc_Rhhlgu4QH_WTKd_5kpe4I2'
libssc_sli.a(ssc_sli_8a64c4e2.c.obj):ssc_sli_8a64c4e2.c:(.text+0x564): undefined reference to mc_Rhhlgu4QH_WTKd_5kpe4I2' libssc_sli.a(ssc_sli_8a64c4e2.c.obj):ssc_sli_8a64c4e2.c:(.text+0x57b): undefined reference to
mc_Rhhlgu4QH_WTKd_5kpe4I2'
libssc_sli.a(ssc_sli_8a64c4e2.c.obj):ssc_sli_8a64c4e2.c:(.text+0xa32): undefined reference to ne_296I30o7aJcMtBtmNyw1p0' libssc_sli.a(ssc_sli_8a64c4e2.c.obj):ssc_sli_8a64c4e2.c:(.text+0xbc2): undefined reference to
ne_04nTccAGGfTttdxxhMsLp_'
libssc_sli.a(ssc_sli_8a64c4e2.c.obj):ssc_sli_8a64c4e2.c:(.text+0xbe7): undefined reference to mc_Rhhlgu4QH_WTKd_5kpe4I2' libssc_sli.a(ssc_sli_8a64c4e2.c.obj):ssc_sli_8a64c4e2.c:(.text+0xbfe): undefined reference to
mc_Rhhlgu4QH_WTKd_5kpe4I2'
collect2.exe: error: ld returned 1 exit status
gmake.exe[2]: *** [test_ssc_dcmotor.dll] Error 1
gmake.exe[1]: *** [CMakeFiles/test_ssc_dcmotor.dir/all] Error 2
gmake.exe: *** [all] Error 2
Error using coder.internal.callMakeHook
The call to grtfmi_make_rtw_hook, during the after_make hook generated the following error:
Failed to build FMU
This should work with 227d0c37ad7292389292e5006fa3475305ca9f22.