Re: HELP: Compiling GTK+ Applications on UNIX
- From: Sven Neumann <sven gimp org>
- To: Paul Davis <pbd Op Net>
- Cc: "Lin, Lynn" <lynn lin boeing com>, "'gtk-list gnome org'" <gtk-list gnome org>
- Subject: Re: HELP: Compiling GTK+ Applications on UNIX
- Date: 28 Jan 2002 20:07:57 +0100
Hi,
Paul Davis <pbd Op Net> writes:
> >What is the different between these 2 methods:
> >
> >1. gcc -o myprog `gtk-config --cflags --libs` (GTK FAQ)
> >
> >2. cc `pkg-config --cflags --libs gtk+-2.0` myprog.c -o mypgrog (GTK+
> >Reference Manual)
as was already stated, the first is the 1.2 way, the second for 2.0.
> the first one is deprecated, involves lots of ugly m4 macros, can
> require disgusting filesystem hacking to deal with aclocal's stupid
> design, and is basically in poor taste.
that's nonsense. gtk-config is a simple bash script and no m4 macros
are involved. You are probably confusing this with the AM_PATH_GTK()
aclocal macro. That macro offers much more functionality than using
gtk-config directly and adds additional checks (like consistency of
headers and library). I'd stronly recommened its use.
GTK+-2.0 has a similar macro AM_PATH_GTK_2_0() and pkg-config also
installs a nice autoconf macro called PKG_CHECK_MODULES(). Read
about it in the pkg-config manpage.
I agree that aclocal is poorly designed and it should really honor
the ACLOCAL_FLAGS environment variable directly instead of relying
on hacks in autogen.sh and configure.in. However you shouldn't need
to hack your filesystem to make aclocal and autoconf happy.
Salut, Sven
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]