../src/project1.cpp:36:2: error: 'uint8_t' redeclared as different kind of symbol uint8_t val, ^ In file included from /usr/local/lpcxpresso_7.2.0_153/lpcxpresso/tools/lib/gcc/arm-none-eabi/4.8.3/include/stdint.h:9:0, from /home/xavier76/LPC1549_WS/lpc_chip_15xx/inc/lpc_types.h:35, from /home/xavier76/LPC1549_WS/lpc_chip_15xx/inc/chip.h:32, from /home/xavier76/LPC1549_WS/lpc_board_nxp_lpcxpresso_1549/inc/board.h:35, from ../src/project1.cpp:21: /usr/local/lpcxpresso_7.2.0_153/lpcxpresso/tools/arm-none-eabi/include/stdint.h:42:19: error: previous declaration of 'typedef __uint8_t uint8_t' typedef __uint8_t uint8_t ; |
/*----------------------------------------------------------------------------- * project1.cpp cropped source code *-----------------------------------------------------------------------------*/ #include "board.h" /***** Line (21) *****/ #include <cr_section_macros.h> typedef enum { Err_OK = 0, Err_Fail, } Error_E; typedef enum { uint8_t val, /***** Line (36) *****/ Error_E error, } RetVal_Type; // And from here there are a lot of errors because uint8_t type duplication |
typedef enum // code (1) { uint8_t val, Error_E error, } RetVal_Type; |
typedef struct // code (2) { uint8_t val; Error_E error; } RetVal_Type; |