필터 지우기
필터 지우기

Embedded Coder Problem with rtwtypes.h and tmwtypes.h

조회 수: 12 (최근 30일)
Christian
Christian 2015년 1월 19일
댓글: Liming Gao 2022년 5월 18일
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???

답변 (0개)

카테고리

Help CenterFile Exchange에서 Embedded Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by