valeriogiampa
Member level 3
Hi,
I have modified an example project of IAR for STM32L1XX with a new library definition (one file .c and one file .h). In the file .h I have defined a variable that I use in the .c file. The function defined in the .h file are developed in the .c file and used in the main file.
There aren't any duplicate of the variable that I have defined in the .h file, but when I run the make command I can see this message:
One error for variable defined in the .h file. Why?
Can you help me?
Best Regards
Valerio
I have modified an example project of IAR for STM32L1XX with a new library definition (one file .c and one file .h). In the file .h I have defined a variable that I use in the .c file. The function defined in the .h file are developed in the .c file and used in the main file.
There aren't any duplicate of the variable that I have defined in the .h file, but when I run the make command I can see this message:
Linking
Error[Li006]: duplicate definitions for "ADC_Counter"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Delay"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\
RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\RAM_Debug\
Obj\main.o"
Error[Li006]: duplicate definitions for "Frequency"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\
RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\RAM_Debug\
Obj\main.o"
Error[Li006]: duplicate definitions for "Frequency_Detection"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Gate_Pulse_Off"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Half_Period_Length"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "LED_Blinking"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Period"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\
RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\RAM_Debug\
Obj\main.o"
Error[Li006]: duplicate definitions for "Period_Counter"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Period_Length"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Period_Prev"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Power_Level"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Power_Level_Prev"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Second_Half_Wave"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Soft_Change_Delay"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Soft_Change_Speed"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Start_Up"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\
RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\RAM_Debug\
Obj\main.o"
Error[Li006]: duplicate definitions for "Timer"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\
RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\GettingStarted-VG1\RAM_Debug\
Obj\main.o"
Error[Li006]: duplicate definitions for "Trimmer_Value"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "Turn_On_Delay"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "ZVS_Alarm"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error[Li006]: duplicate definitions for "ZVS_Alarm_Counter"; in "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\appSource.o", and "C:\Users\hp\Desktop\STM32L1xx\Demos_STM32-P152_v1.00\Demos\Projects\
GettingStarted-VG1\RAM_Debug\Obj\main.o"
Error while running Linker
Total number of errors: 22
Total number of warnings: 0
One error for variable defined in the .h file. Why?
Can you help me?
Best Regards
Valerio
Last edited by a moderator: