To compile and link the first example from the gtk Tutorial:
#include <gtk/gtk.h>
int main (int argc, char *argv[])
{
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_widget_show (window);
gtk_main ();
return 0;
}
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
I do have the latest (hamm) versions of the libraries, binutils and gcc,
ldd on the resulting binary gives:
$ ldd ./ghello
libX11.so.6 => /usr/X11R6/lib/libX11.so.6 (0x4000f000)
libglib.so.1 => /usr/lib/libglib.so.1 (0x400b2000)
libgdk.so.1 => /usr/lib/libgdk.so.1 (0x400bd000)
libgtk.so.1 => /usr/lib/libgtk.so.1 (0x400dd000)
libm.so.6 => /lib/libm.so.6 (0x40171000)
libc.so.6 => /lib/libc.so.6 (0x4018c000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
libXi.so.6 => /usr/X11R6/lib/libXi.so.6 (0x4022f000)
libXext.so.6 => /usr/X11R6/lib/libXext.so.6 (0x40237000)
Are there still some libraries made with a libc5 libc6 mixture?
Nils
--
*-----------------------------------------------------------------------------*
| Quotes from the net: L> Linus Torvalds, W> Winfried Truemper |
| L>this is the special easter release of linux, more mundanely called 1.3.84 |
| W>Umh, oh. What do you mean by "special easter release"?. Will it quit |
* W>working today and rise on easter? *
Attachment:
pgpS3dCoE_LiU.pgp
Description: PGP signature