I am converting a program that was generated using the Atollic tool chain, which uses the GNU compiler. After cleaning up a few small syntax differences, I am getting a L6200E multiply defined symbol error from the linker.
The project includes the following files: main.c, main.h, UARTMain.c, Utilities.c, fpDefs.h, STM32_Common.c, and STM32_Common.h.
STM32_Common.c includes STM32_Common.h, which also includes main.h. Main.c, UARTMain.c, and Utilities.c, all include main.h. Main.h has the normal #ifndef __MAIN_H_ | #define __MAIN_H_ protection from getting included twice.
It appears to me that main.h is getting included more than once as variables that are referenced in main.c and one of the other *.c file generate the linker error. This program compiles and runs fine in the Atollic environment.
Tom