17 Jul
2007
17 Jul
'07
4:58 p.m.
On Tue, 17 Jul 2007 17:24:14 +0530, Ganesh Kundapur said:
gcc -g -O2 -Wall -g -o syslog-ng main.o libsyslog-ng.a -lnsl -lrt -Wl,-Bstatic -lfl -L/home/kundapur/GLIB-2.12.9/lib -lglib-2.0 -L/usr/local/lib -levtlog -lwrap -Wl,-Bdynamic
$ cc glib.c `pkg-config --cflags --libs glib-2.0`
This is a good way to shoot yourself in the foot - you're hand-specifying -L and -l flags in the first, but using pkgconfig to get the values in the second. If they ever get out of sync (because you actually installed into /opt/lib or whatever), you'll be banging your head against the wall for quite some time....