[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Warnings when linking with gtk



> I use the minimal Makefile:
> 
> CFLAGS=-O2 -g -I/usr/lib/glib/include/
> LDFLAGS=-L/usr/X11R6/lib -lX11 -lglib -lgdk -lgtk -lm
> 
> and get an (apparently) working program but the warnings:
> 
> ld: warning: libc.so.5, needed by /usr/lib/libc5-compat/libXi.so.6, may
> conflict with libc.so.6
> /lib/libc.so.5: the `Getwd' function is dangerous and should not be used.
> /lib/libc.so.5: the `Gets' function is dangerous and should not be used.
> /lib/libc.so.5: warning: `Siggetmask' is obsolete; `Sigprocmask' is best

Well, there are a couple of issues here.
First, your linker line is a bit messed up. Not all of the necessary
libraries are present and worst of all, not in correct order.
While compiling with GTK I would recommend using the following:

CFLAGS = <Your local flags, like -O2 -g> `gtk-congig --cflags`
LDFLAGS= <your local flags, if any (*)> `gtk-config --libs`

(*) (In case you want to link with some other library, in addition to GTK,
like electric-fence or whatever.)

Also, check that libc5-compat entries are at the very end of
/etc/ld.so.conf file.

Good luck.

ALex Y
-- 
   _ 
 _( )_
(     (o___           +-------------------------------------------+
 |      _ 7           |            Alexander Yukhimets            |
  \    (")            |       http://pages.nyu.edu/~aqy6633/      |
  /     \ \           +-------------------------------------------+


--
To UNSUBSCRIBE, email to debian-devel-request@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org


Reply to: