ashish-yadav11 / dwmblocks

Rewrite of dwmblocks with added features including clickability, cursor hinting and color.
ISC License
210 stars 30 forks source link

Make fails to link again xlib library #5

Closed mapa17 closed 4 years ago

mapa17 commented 4 years ago

Hi, running make fails on my ubuntu 20.04 with libx11-dev/focal,now 2:1.6.9-2ubuntu1 amd64 [installed]

gcc -o dwmblocks -lX11 -O3 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter dwmblocks.c
/usr/bin/ld: /tmp/ccqqpnQ0.o: in function `sighandler':
dwmblocks.c:(.text+0x5b7): undefined reference to `XStoreName'
/usr/bin/ld: dwmblocks.c:(.text+0x5c9): undefined reference to `XSync'
/usr/bin/ld: /tmp/ccqqpnQ0.o: in function `main':
dwmblocks.c:(.text.startup+0x12d): undefined reference to `XOpenDisplay'
/usr/bin/ld: dwmblocks.c:(.text.startup+0x422): undefined reference to `XStoreName'
/usr/bin/ld: dwmblocks.c:(.text.startup+0x42e): undefined reference to `XCloseDisplay'
/usr/bin/ld: dwmblocks.c:(.text.startup+0x4f5): undefined reference to `XStoreName'
/usr/bin/ld: dwmblocks.c:(.text.startup+0x503): undefined reference to `XSync'
/usr/bin/ld: dwmblocks.c:(.text.startup+0x542): undefined reference to `XStoreName'
/usr/bin/ld: dwmblocks.c:(.text.startup+0x550): undefined reference to `XSync'
collect2: error: ld returned 1 exit status
make: *** [Makefile:11: dwmblocks] Error 1

Any ideas what I am missing?

Best, Manuel

ashish-yadav11 commented 4 years ago

Can you make after the latest commit? I have replaced manual linking with pkg-config and corrected the argument order in makefile.

mapa17 commented 4 years ago

Yes, that fixes the issue! Thank you