I am facing below mentioned error while running B2B in Simulink Test - Matlab in 2019b Error: useless type name in empty declaration typedef char char_T;

20 次查看(过去 30 天)
C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>cd . C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>if "" == "" ("C:\PROGRA~1\MATLAB\R2019b\bin\win64\gmake" -f TOS_Core.mk all ) else ("C:\PROGRA~1\MATLAB\R2019b\bin\win64\gmake" -f TOS_Core.mk ) "C:\PROGRA~3\MATLAB\SUPPOR~1\R2019b\3P778C~1.INS\MINGW_~1.INS\bin/gcc" -c -fwrapv -m64 -O0 -DMODEL=TOS_Core -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DRTE_COMPONENT_HEADER=\"Rte_APP_SWC_TOS.h\" -DINCLUDE_RTE_HEADER=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DMODEL=TOS_Core -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 @TOS_Core_comp.rsp -o "TOS_Core.obj" "C:/B2B/work/slprj/autosar/TOS_Core/TOS_Core.c" C:\B2B\work\slprj\autosar\_sharedutils\rtwtypes.h:71:14: error: two or more data types in declaration specifiers typedef char char_T; ^~~~ C:\B2B\work\slprj\autosar\_sharedutils\rtwtypes.h:71:1: warning: useless type name in empty declaration typedef char char_T; ^~~~~~~ gmake: *** [TOS_Core.obj] Error 1 C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>echo The make command returned an error of 2 The make command returned an error of 2 C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>exit 1 Error(s) encountered while building "TOS_Core_rtwlib": ### Failed to generate all binary outputs.
Index exceeds the number of array elements (0).
Error while bringing model references of model APP_SWC_TOS_Harness2 up to date: C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>cd . C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>if "" == "" ("C:\PROGRA~1\MATLAB\R2019b\bin\win64\gmake" -f TOS_Core.mk all ) else ("C:\PROGRA~1\MATLAB\R2019b\bin\win64\gmake" -f TOS_Core.mk ) "C:\PROGRA~3\MATLAB\SUPPOR~1\R2019b\3P778C~1.INS\MINGW_~1.INS\bin/gcc" -c -fwrapv -m64 -O0 -DMODEL=TOS_Core -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DRTE_COMPONENT_HEADER=\"Rte_APP_SWC_TOS.h\" -DINCLUDE_RTE_HEADER=1 -DCLASSIC_INTERFACE=0 -DALLOCATIONFCN=0 -DTERMFCN=0 -DONESTEPFCN=1 -DMAT_FILE=0 -DMULTI_INSTANCE_CODE=0 -DINTEGER_CODE=0 -DMT=0 -DTID01EQ=0 -DPORTABLE_WORDSIZES -DMODEL=TOS_Core -DNUMST=1 -DNCSTATES=0 -DHAVESTDIO -DMODEL_HAS_DYNAMICALLY_LOADED_SFCNS=0 @TOS_Core_comp.rsp -o "TOS_Core.obj" "C:/B2B/work/slprj/autosar/TOS_Core/TOS_Core.c" C:\B2B\work\slprj\autosar\_sharedutils\rtwtypes.h:71:14: error: two or more data types in declaration specifiers typedef char char_T; ^~~~ C:\B2B\work\slprj\autosar\_sharedutils\rtwtypes.h:71:1: warning: useless type name in empty declaration typedef char char_T; ^~~~~~~ gmake: *** [TOS_Core.obj] Error 1 C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>echo The make command returned an error of 2 The make command returned an error of 2 C:\B2B\work\slprj\autosar\TOS_Core\sil\hostobj\instrumented>exit 1 Error(s) encountered while building "TOS_Core_rtwlib": ### Failed to generate all binary outputs.

回答(1 个)

Karanjot
Karanjot 2024-11-3,19:26
Hi Deepa,
It looks like you're encountering an issue with the typedef declaration in your generated code, specifically in the 'rtwtypes.h' file. The error message indicates that there's a conflict with the 'char_T' type definition. Here are a few steps you can take to potentially resolve this issue:
  • Check for Redefinitions: Ensure 'char_T' isn't redefined elsewhere.
  • Header Conflicts: Verify no conflicting includes or directives.
  • Code Gen Settings: Review and ensure consistent data type settings.
  • Clean & Rebuild: Clear build artifacts and rebuild the model.
I hope this helps!

类别

Help CenterFile Exchange 中查找有关 Test Model Components 的更多信息

标签

产品


版本

R2019b

Community Treasure Hunt

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

Start Hunting!

Translated by