Re: Gtk FAQ



Tony:
I send you the first patch. It is about the change of gtk-config for pkg-config.
Is this patch right?
All corrections are welcome :)

Gonzalo

Tony Gale wrote:
On Thu, 2003-04-10 at 13:43, Gonzalo Odiard wrote:
  
I am reading the Gtk FAQ. I think is a god document for beginers, but it 
is very outdated.
There are anyone working on this?
I can send patches for the FAQ?
Is gtk-devel-list the correct place for this questions?

    

Send them my way please.

Thanks
-tony

  

--- gtk-faq.sgml	2003-04-21 14:25:51.000000000 -0300
+++ gtk-faq.sgml.new	2003-04-21 15:12:48.000000000 -0300
@@ -463,7 +463,7 @@
 <para>Then you need to run /sbin/ldconfig as root. You can
 find what directory GTK is in using</para>
 
-<para><literallayout><literal>gtk-config --libs</literal>
+<para><literallayout><literal>pkg-config gtk+-2.0 --libs</literal>
 </literallayout></para>
 
 <para>If your system doesn't use ld.so to find libraries
@@ -514,7 +514,7 @@
 <literal>glibconfig.h</literal>.</title>
 
 <para>The header file "glibconfig.h" was moved to the
-directory $exec_prefix/lib/glib/include/. $exec_prefix is the
+directory $exec_prefix/lib/glib-2.0/include/. $exec_prefix is the
 directory that was specified by giving the --exec-prefix flags
 to ./configure when compiling GTK+. It defaults to  $prefix,
 (specified with --prefix), which in turn defaults to /usr/local/.</para>
@@ -524,19 +524,12 @@
 include files are put in $prefix/include, which can be shared
 between different architectures.</para>
 
-<para>GTK+ includes a shell script, <literal>/gtk-config/</literal>,
-that makes it easy to find out the correct include paths. The GTK+
-Tutorial includes an example of using <literal>/gtk-config/</literal>
-for simple compilation from the command line. For information about more
-complicated configuration, see the file docs/gtk-config.txt in the GTK+
-distribution.</para>
-
 <para>If you are trying to compile an old program, you may be
 able to work around the problem by configuring it with a
 command line like:</para>
 
 <para><literallayout>
-<literal>setenv CPPFLAGS "-I/usr/local/include/glib/include"</literal>
+<literal>setenv CPPFLAGS "-I/usr/local/include/glib-2.0/include"</literal>
 <literal>./configure</literal>
 </literallayout></para>
 
@@ -561,12 +554,12 @@
 break the <literal>control-panel</literal> applications.</simpara>
 </listitem>
 
-<listitem><simpara><literal>gtk-config</literal> (or another
+<listitem><simpara><literal>pkg-config</literal> (or another
 component of GTK) isn't in your path, or there is an old
 version on your system. Type:</simpara>
 
 <para><literallayout>
-<literal>gtk-config --version</literal>
+<literal>pkg-config gtk+-2.0 --version</literal>
 </literallayout></para>
 
 <para>to check for both of these. If it returns a value
@@ -907,14 +900,14 @@
 
 <para>The classic command line to compile a GTK+ based program is</para>
 <para><literallayout>
-<literal>gcc -o myprog [c files] `gtk-config --cflags --libs`</literal>
+<literal>gcc -o myprog [c files] `pkg-config gtk+-2.0 --cflags --libs`</literal>
 </literallayout></para>
 
 <para>You should notice the backquote character which is used
 in this command line. A common mistake when you start a GTK+
 based development is to use quote instead of backquotes. If
 you do so, the compiler will complain about an unknown file
-called <filename>gtk-config --cflags --libs</filename>. The
+called <filename>pkg-config gtk+-2.0 --cflags --libs</filename>. The
 text in backquotes is an instruction to your shell to
 substitute the output of executing this text into the
 commandline.</para>
@@ -947,8 +940,8 @@
 # basic GTK+ app makefile
 SOURCES = myprg.c foo.c bar.c
 OBJS    = ${SOURCES:.c=.o}
-CFLAGS  = `gtk-config --cflags`
-LDADD   = `gtk-config --libs`
+CFLAGS  = `pkg-config gtk+-2.0 --cflags`
+LDADD   = `pkg-config gtk+-2.0 --libs`
 CC      = gcc
 PACKAGE = myprg
 
@@ -1257,7 +1250,7 @@
 /*
  * Compile with:
  *
- * cc -o gtk-thread gtk-thread.c `gtk-config --cflags --libs gthread`
+ * cc -o gtk-thread gtk-thread.c `pkg-config gtk+-2.0 --cflags --libs gthread`
  *
  * Thanks to Sebastian Wilhelmi and Owen Taylor for pointing out some
  * bugs.
@@ -1420,7 +1413,7 @@
 /*
  * Compile with:
  *
- * cc -o gtk-fork gtk-fork.c `gtk-config --cflags --libs`
+ * cc -o gtk-fork gtk-fork.c `pkg-config gtk+-2.0 --cflags --libs`
  *
  */
 


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