Order of gcc args wrong, linking fails #1

Merged
merged 1 commit into from Dec 23, 2012

Projects

None yet

2 participants

@vsiegel

Hi!

In gcc call, moving -l options (generated by pkg-config) to end of command line so they are found when linking

The -l options from pkg-config need to be at the end of the gcc command line in Makefile
to be in effect, otherwise the linking fails.
I got an error like below when compiling:

$ make
gcc pkg-config --libs --cflags x11 xmu xsetprop.c -o xsetprop
/tmp/ccQbRUHw.o: In function splits_to_atomsarray':
xsetprop.c:(.text+0x349): undefined reference to
XInternAtom'
...some similar lines

Best Regards,
Volker

Volker Siegel in gcc call, moving -l options (generated by pkg-config) to end of co…
…mmand line so they are found when linking
13f6421
@Bad-ptr Bad-ptr merged commit 13f6421 into Bad-ptr:master Dec 23, 2012
@Bad-ptr
Owner

Ok. Thanks.
// Though I had no such errors.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment