Multiple definitions of - GCC bogus error
问题 I have a header file lcd.h with this (shortened): #pragma once // ... const uint8_t LCD_ROW_ADDR[] = {0x00, 0x40, 0x14, 0x54}; // ... other prototypes and macros... And a file lcd.c where this variable is used: #include <stdbool.h> #include <stdint.h> // ... #include "lcd.h" // ... /** Set cursor position */ void lcd_xy(const uint8_t x, const uint8_t y) { lcd_set_addr(LCD_ROW_ADDR[y] + (x)); } I include lcd.h in main.c , and lcd.c is compiled separately using makefile. I'm getting this error: