Embedded Coder Problem with rtwtypes.h and tmwtypes.h

10 Ansichten (letzte 30 Tage)
Christian
Christian am 19 Jan. 2015
Kommentiert: Liming Gao am 18 Mai 2022
Hello I generated Code with Embedded Coder 2014b. Afterwards I include the autocode in a C++ S-Function and I get the following mex error:
------------------------------------------------
Error using mex cilcom_sfun.cpp d:\projects\gma\gncdesign_matlab2014b\enforcer\sim\work_gnc_double_precision\gnc_ert_rtw\rtwtypes.h(69) : error C2371: 'byte_T' : redefinition; different basic types C:\Program Files\MATLAB\R2014b\extern\include\tmwtypes.h(543) : see declaration of 'byte_T' d:\projects\gma\gncdesign_matlab2014b\enforcer\sim\work_gnc_double_precision\gnc_ert_rtw\rtwtypes.h(78) : warning C4005: 'MAX_uint8_T' : macro redefinition C:\Program Files\MATLAB\R2014b\extern\include\tmwtypes.h(660) : see previous definition of 'MAX_uint8_T' d:\projects\gma\gncdesign_matlab2014b\enforcer\sim\work_gnc_double_precision\gnc_ert_rtw\rtwtypes.h(79) : warning C4005: 'MIN_uint8_T' : macro redefinition C:\Program Files\MATLAB\R2014b\extern\include\tmwtypes.h(661) : see previous definition of 'MIN_uint8_T' d:\projects\gma\gncdesign_matlab2014b\enforcer\sim\work_gnc_double_precision\gnc_ert_rtw\rtwtypes.h(82) : warning C4005: 'MAX_uint16_T' : macro redefinition C:\Program Files\MATLAB\R2014b\extern\include\tmwtypes.h(665) : see previous definition of 'MAX_uint16_T' d:\projects\gma\gncdesign_matlab2014b\enforcer\sim\work_gnc_double_precision\gnc_ert_rtw\rtwtypes.h(83) : warning C4005: 'MIN_uint16_T' : macro redefinition C:\Program Files\MATLAB\R2014b\extern\include\tmwtypes.h(666) : see previous definition of 'MIN_uint16_T' d:\projects\gma\gncdesign_matlab2014b\enforcer\sim\work_gnc_double_precision\gnc_ert_rtw\rtwtypes.h(87) : warning C4005: 'MIN_uint32_T' : macro redefinition C:\Program Files\MATLAB\R2014b\extern\include\tmwtypes.h(671) : see previous definition of 'MIN_uint32_T'
-----------------------------------------------------------
When I add the lines in rtwtypes.h of a autocode from 2012b it is compile clean, now redefinitions:
...
#ifndef TMWTYPES
#define TMWTYPES
#include limits.h
... ... ...
/* This ID is used to detect inclusion of an incompatible rtwtypes.h */
#define RTWTYPES_ID_C08S16I32L32N32F1
#else /* TMWTYPES */
#define TMWTYPES_PREVIOUSLY_INCLUDED
#endif /* TMWTYPES */
... ...
How Can I fix this Problem???

Antworten (0)

Kategorien

Mehr zu Embedded Coder finden Sie in Help Center und File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by