fix linker error #11

Merged
kollo merged 1 commits from ashimokawa/MQTT-Hyperdash:fix-linker-error into master 6 months ago
Collaborator

Without this change I get this on a Debian 11 (bullseye)
gcc version 10.2.1 20210110 (Debian 10.2.1-6)

gcc -Wall -L.  -o dashdesign dashdesign.o menu.o element_groups.o hyperdash.o mqtt.o lodepng.o file.o util.o graphics.o bitmap.o input.o input_value_dialog.o elements.o subscribe.o -lm -lpthread -lpaho-mqtt3c -lSDL -lSDL_gfx -lSDL_ttf -lX11 `pkg-config --libs gtk+-2.0`
/usr/bin/ld: menu.o:/xxx/MQTT-Hyperdash/src/dashdesign.h:50: multiple definition of `current_bgc'; dashdesign.o:/home/andi/codeberg/MQTT-Hyperdash/src/dashdesign.h:50: first defined here
/usr/bin/ld: menu.o:/xxx/MQTT-Hyperdash/src/dashdesign.h:49: multiple definition of `current_fgc'; dashdesign.o:/home/andi/codeberg/MQTT-Hyperdash/src/dashdesign.h:49: first defined here
collect2: error: ld returned 1 exit status
make: *** [Makefile:237: dashdesign] Fehler 1
Without this change I get this on a Debian 11 (bullseye) gcc version 10.2.1 20210110 (Debian 10.2.1-6) ``` gcc -Wall -L. -o dashdesign dashdesign.o menu.o element_groups.o hyperdash.o mqtt.o lodepng.o file.o util.o graphics.o bitmap.o input.o input_value_dialog.o elements.o subscribe.o -lm -lpthread -lpaho-mqtt3c -lSDL -lSDL_gfx -lSDL_ttf -lX11 `pkg-config --libs gtk+-2.0` /usr/bin/ld: menu.o:/xxx/MQTT-Hyperdash/src/dashdesign.h:50: multiple definition of `current_bgc'; dashdesign.o:/home/andi/codeberg/MQTT-Hyperdash/src/dashdesign.h:50: first defined here /usr/bin/ld: menu.o:/xxx/MQTT-Hyperdash/src/dashdesign.h:49: multiple definition of `current_fgc'; dashdesign.o:/home/andi/codeberg/MQTT-Hyperdash/src/dashdesign.h:49: first defined here collect2: error: ld returned 1 exit status make: *** [Makefile:237: dashdesign] Fehler 1 ```
ashimokawa added 1 commit 6 months ago
kollo merged commit 4db2231e20 into master 6 months ago
The pull request has been merged as 4db2231e20.
Sign in to join this conversation.
Loading…
There is no content yet.