[514] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: Repost: -lgtk -lgdk -lglib -lX11 ??

daemon@ATHENA.MIT.EDU (Rob Browning)
Thu Jul 24 02:22:45 1997

To: gtk-list@redhat.com
From: Rob Browning <rlb@cs.utexas.edu>
Date: 24 Jul 1997 01:28:23 -0500
In-Reply-To: Borg's message of "Wed, 23 Jul 1997 22:38:46 -0700"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com

Borg <vladimip@uniserve.com> writes:

> What linking options do I need to pass to compile a gtk app?

Here's the Makefile I used to compile the simple hello world app.  I
took the sample from the web page and modified it slightly (without
LOADLIBES it was putting the libs in the wrong place on the command
line for my system).  This assumes GNU make (what else is there :>).

GTK_BASE=/usr/local/gtk+

GTK_INCLUDE = -I${GTK_BASE}/include
GTK_LIB = -L${GTK_BASE}/lib
X11_LIB = -L/usr/X11R6/lib
CC = gcc -g -Wall
CFLAGS = $(GTK_INCLUDE)
LDFLAGS = $(GTK_LIB) $(X11_LIB)
LOADLIBES = -lgtk -lgdk -lglib -lX11 -lXext -lm

OBJS = helloworld.o

helloworld: $(OBJS)
# $(CC) $(GTK_LIB) $(X11_LIB) $(OBJS) -o helloworld $(LDFLAGS)

clean:
  rm -f *.o *~ helloworld

--
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post