Re: problem compiling GTK application...
On Sun, 14 Dec 2003, Alain D'EURVEILHER wrote:
> I tried this :
> in my Makefile :
> --------------
> GLIBS = `gtk-config --libs --cflags`
> GFLAGS = `gtk-config --cflags`
> GNLIBS = `gnome-config --cflags --libs gnomeui`
> GNFLAGS = `gnome-config --cflags`
> GTALL = `pkg-config --cflags --libs gtk+-2.0`
> GTFLAGS = `pkg-config --cflags gtk+-2.0`
> GTLIBS = `pkg-config --libs gtk+-2.0`
>
> all: reboot
>
> reboot: reboot.o
> cc reboot.o -o reboot $(GTALL)
>
> reboot.o: reboot.c
> cc reboot.c -c -o reboot.o $(GTFLAGS)
>
> clean:
> rm -f *.o
> -----------------------
> then
> -----------------------
> 13:17 bozz@BOZZ ~/gtk/test1% make clean && make
> rm -f *.o
> cc reboot.c -c -o reboot.o `pkg-config --cflags gtk+-2.0`
> cc reboot.o -o reboot `pkg-config --cflags --libs gtk+-2.0`
> 13:20 bozz@BOZZ ~/gtk/test1%
> ------------------------
>
> => it looks fine. But am I right this way ??
>
> thx AlaiN.
Yes, except that gnome-config is deprecated; use pkg-config instead.
Chipzz AKA
Jan Van Buggenhout
PS: s/ --libs// is a regular expression, used to abbreviate a search-
and-replace.
--
------------------------------------------------------------------------
UNIX isn't dead - It just smells funny
Chipzz@ULYSSIS.Org
------------------------------------------------------------------------
Reply to: