"Multiple definition" Error compilation of typedef on header file
Hello, I imported a project on STM32CubeIDE V1.9.
But when i compile, i have many errors (nearly 760) like this :
d:\stm32cubeide_1.9.0\stm32cubeide\plugins\com.st.stm32cube.ide.mcu.externaltools.gnu-tools-for-stm32.10.3-2021.10.win32_1.0.0.202111181127\tools\arm-none-eabi\bin\ld.exe: ./Application ino/Src/ino_1_IO.o:C:/Users/innolife/STM32CubeIDE/workspace_1.9.0/PE30-V_V2.41-K_V2.2/Drivers/AX/Inc/AX_IO.h:21: multiple definition of `Gestion_INPUT'; ./Application ino/Src/ino_0_Application.o:C:/Users/innolife/STM32CubeIDE/workspace_1.9.0/PE30-V_V2.41-K_V2.2/Drivers/AX/Inc/AX_IO.h:21: first defined here
The error is on declarations of a typedef or enum on a header files.
Few struct are declared like this :
typedef struct
{
uint8_t OldState_1;
uint8_t Flag_IN_1;
uint8_t Flag_OUT_1;
uint8_t TIMER_1;
uint8_t OldState_2;
uint8_t TIMER_2;
uint8_t OldState_3;
uint8_t TIMER_3;
uint8_t OldState_4;
uint8_t Flag_IN_4;
uint8_t Flag_OUT_4;
uint8_t TIMER_4;
}GESTION_IO;
GESTION_IO Gestion_INPUT, Gestion_OUTPUT;
the headers files are include in all C file of the software.
Have you got an idea to solve my problem?
Thanks in advance for your help
