NI VeriStand

cancel
Showing results for 
Search instead for 
Did you mean: 

Compiling Simulink model for linux RT target error: libmwpolyfun.lib, error adding symbols: File format not recognized

Hello,

 

I'm trying to comile a model in simulink for Linux RT.

Host OS: Win10

Veristand version: 2019R3

Matlab verison: 2019b

tlc in simulink: VeriStand.tlc

Toolchain: VeriStand Compiler for Linux64 targets | gmake makefile (64bit Linux)

 

The error information:

"### Creating standalone executable "../VeriStandTemp5.so" ..."

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-g++"   -m64 -shared --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux   -o../VeriStandTemp5.so @VeriStandTemp5.rsp C:/PROGRA~1/MATLAB/R2019b/extern/lib/win64/mingw64/libmwpolyfun.lib

C:/PROGRA~1/MATLAB/R2019b/extern/lib/win64/mingw64/libmwpolyfun.lib: error adding symbols: File format not recognized

collect2.exe: error: ld returned 1 exit status

gmake: *** [../VeriStandTemp5.so] Error 1

 How can I fix this error?

 

Thanks!

 

In addition, the whole diagnostic information in simulink:

C:\software_project\VeriStandTemp005\VeriStandTemp5_veristand_rtw>"C:\PROGRA~1\MATLAB\R2019b\bin\win64\gmake"  -f VeriStandTemp5.mk all

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"VeriStandTemp5.obj" "C:/software_project/VeriStandTemp005/VeriStandTemp5_veristand_rtw/VeriStandTemp5.c"

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"VeriStandTemp5_data.obj" "C:/software_project/VeriStandTemp005/VeriStandTemp5_veristand_rtw/VeriStandTemp5_data.c"

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"ni_modelframework.obj" "C:/software_project/VeriStandTemp005/VeriStandTemp5_veristand_rtw/ni_modelframework.c"

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"rtGetInf.obj" "C:/software_project/VeriStandTemp005/VeriStandTemp5_veristand_rtw/rtGetInf.c"

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"rtGetNaN.obj" "C:/software_project/VeriStandTemp005/VeriStandTemp5_veristand_rtw/rtGetNaN.c"

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"rt_nonfinite.obj" "C:/software_project/VeriStandTemp005/VeriStandTemp5_veristand_rtw/rt_nonfinite.c"

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"rt_sim.obj" "C:/PROGRA~1/MATLAB/R2019b/rtw/c/src/rt_sim.c"

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-gcc"   -c -m64 -fPIC -fdollars-in-identifiers -DkNIOSLinux --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux -O0 -g -DCLASSIC_INTERFACE=1 -DALLOCATIONFCN=0 -DMAT_FILE=1 -DONESTEPFCN=0 -DTERMFCN=1 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DNI_ROOTMODEL_VeriStandTemp1 -DNI_ROOTMODEL_VeriStandTemp3 -DNI_ROOTMODEL_VeriStandTemp5 -DTID01EQ=0 -DMODEL=VeriStandTemp5 -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DRT -DUSE_RTMODEL  @VeriStandTemp5_comp.rsp -o"classic_main.obj" "C:/PROGRA~1/MATLAB/R2019b/rtw/c/grt/classic_main.c"

"### Creating standalone executable "../VeriStandTemp5.so" ..."

"C:\build\17.0\x64\sysroots\i686-nilrtsdk-mingw32\usr\bin\x86_64-nilrt-linux/x86_64-nilrt-linux-g++"   -m64 -shared --sysroot=C:\build\17.0\x64\sysroots\core2-64-nilrt-linux   -o../VeriStandTemp5.so @VeriStandTemp5.rsp C:/PROGRA~1/MATLAB/R2019b/extern/lib/win64/mingw64/libmwpolyfun.lib

C:/PROGRA~1/MATLAB/R2019b/extern/lib/win64/mingw64/libmwpolyfun.lib: error adding symbols: File format not recognized

collect2.exe: error: ld returned 1 exit status

gmake: *** [../VeriStandTemp5.so] Error 1
0 Kudos
Message 1 of 4
(209 Views)

Hello,

Could You please add more information about what type of data You are trying to compile, What kind of translate did You use? 

And check this link, there are some MathScrip functions that are not supported in LabView.

Regards.

0 Kudos
Message 2 of 4
(123 Views)

Hello,

Thank you for the reply. 

The simulink model used is shown below:

simulink_model.PNG

 The model in the circle name d with VDG is from the library [Automated driving toolbox / driving scenario and sensor modeling].

The source code for this VDG is attached. 

0 Kudos
Message 3 of 4
(105 Views)

Hi, 

Check this links (1) (2) , it might help.

This error might be because of the formats doesn't match, check if everything you are using matches with each other. 

Regards.  

0 Kudos
Message 4 of 4
(79 Views)