I created .c file, and add a few TWI functions to it. However, when I run the code in segger, all functions in the .c file shows a "multiple definitions of xxxx" error (see below image)

Thanks
I created .c file, and add a few TWI functions to it. However, when I run the code in segger, all functions in the .c file shows a "multiple definitions of xxxx" error (see below image)

Thanks
Hello,
It looks like you have defined the same functions in your main.c file? You need to remove these to get rid of the linker errors.
Best regards,
Vidar
Hi Vidar, I have checked that the only place where I defined these functions is the <twi_lcd_sdp31.c> file. I didn't define the same function in my <main.c> file. All functions in <twi_lcd_sdp31.c> file has the "multiple definitions error".
Just for test, I also created a new function in <twi_lcd_sdp31.c> with a random name:
void testdsaseadasnd()
{
}
The Segger still gives the "multiple definitions error" to this random name function.
I have also tried: clean solution, rebuild the solution. However, it doesn't help.
Any other ideas, please? Thanks!
Hi Vidar, I have checked that the only place where I defined these functions is the <twi_lcd_sdp31.c> file. I didn't define the same function in my <main.c> file. All functions in <twi_lcd_sdp31.c> file has the "multiple definitions error".
Just for test, I also created a new function in <twi_lcd_sdp31.c> with a random name:
void testdsaseadasnd()
{
}
The Segger still gives the "multiple definitions error" to this random name function.
I have also tried: clean solution, rebuild the solution. However, it doesn't help.
Any other ideas, please? Thanks!
Hi, are you able to share you project so I can try building it here?