This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
RE: xlib compile issues
- From: Igor Pechtchanski <pechtcha at cs dot nyu dot edu>
- To: cygwin-xfree at cygwin dot com
- Cc: "'Zach Gelnett'" <zach at prozach dot com>
- Date: Thu, 7 Oct 2004 09:58:49 -0400 (EDT)
- Subject: RE: xlib compile issues
- References: <000401c4ac72$b682a140$3a06b4c7@gwy1a477>
- Reply-to: cygwin-xfree at cygwin dot com
- Reply-to: cygwin-xfree at cygwin dot com
On Thu, 7 Oct 2004, Zach Gelnett wrote:
> That seems to fix the issue, but it happens over and over again, is there
> some setting I can change as it seems that all make files that I'm
> downloading for these dockapps have the order of the above example instead
> of the below example.
>
> gcc -pedantic -Wall -W -O -L/usr/X11R6/lib -lX11 \
> `pkg-config --libs glib-2.0` docker.o kde.o icons.o xproperty.o net.o -o docker
>
> gcc -pedantic -Wall -W -O -L/usr/X11R6/lib \
> docker.o kde.o icons.o xproperty.o net.o -o \
> docker `pkg-config --libs glib-2.0` -lX11
configure issue, most likely. It looks like "-L/usr/X11R6/lib -lX11" (and
`pkg-config --libs glib-2.0`) are added to LDFLAGS instead of LDLIBS.
FYI, adding them to LDLIBS in the same order they were added to LDFLAGS
will result in
gcc -pedantic -Wall -W -O docker.o kde.o icons.o xproperty.o net.o \
-L/usr/X11R6/lib -lX11 `pkg-config --libs glib-2.0` -o docker
The placement of the "-o docker" doesn't matter, though, and neither does
that of "-L/usr/X11R6/lib" (as long as it's before "-lX11").
Incidentally, `pkg-config --libs glib-2.0` is a) buggy (won't work if
there are spaces in directories -- the whole `...` expression needs to be
quoted for that), and b) inefficient (better to save the output in a
variable once).
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha@cs.nyu.edu
ZZZzz /,`.-'`' -. ;-;;,_ igor@watson.ibm.com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing." -- Dr. Jubal Harshaw