[gtk+] docs: Reorder compiler command line for new GCC



commit b8d28064178074d7f4022900b948b70f408af397
Author: David King <amigadave amigadave com>
Date:   Tue Nov 13 14:13:32 2012 +0000

    docs: Reorder compiler command line for new GCC
    
    Newer versions of GCC/binutils must have the source file come before the
    preprocessor and linker flags on the compiler command line, and this is
    also compatible with previous versions.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=680241

 docs/reference/gtk/compiling.sgml |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/docs/reference/gtk/compiling.sgml b/docs/reference/gtk/compiling.sgml
index 012cb70..f61460c 100644
--- a/docs/reference/gtk/compiling.sgml
+++ b/docs/reference/gtk/compiling.sgml
@@ -42,7 +42,7 @@ feature of the shell. If you enclose a command in backticks
 substituted into the command line before execution. So to compile
 a GTK+ Hello, World, you would type the following:
 <programlisting>
-$ cc `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
+$ cc `pkg-config --cflags gtk+-3.0` hello.c -o hello `pkg-config --libs gtk+-3.0`
 </programlisting>
 </para>
 
@@ -67,7 +67,7 @@ this range will trigger compiler warnings.
 Here is how you would compile hello.c if you want to allow it
 to use symbols that were not deprecated in 3.2:
 <programlisting>
-$ cc -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
+$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MIN_REQIRED=GDK_VERSION_3_2 hello.c -o hello `pkg-config 
--libs gtk+-3.0`
 </programlisting>
 </para>
 
@@ -75,7 +75,7 @@ $ cc -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+
 And here is how you would compile hello.c if you don't want
 it to use any symbols that were introduced after 3.4:
 <programlisting>
-$ cc -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
+$ cc `pkg-config --cflags gtk+-3.0` -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_4 hello.c -o hello `pkg-config 
--libs gtk+-3.0`
 </programlisting>
 </para>
 


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