summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2012-08-03 01:49:56 +0200
committerMatthias Clasen <mclasen@redhat.com>2012-08-04 16:14:31 -0400
commitbdbd47818f3407748d8283919a2d89a7434808a7 (patch)
treee93018a5b5c49c9d6c375afd0d6ea8ed816ae472 /docs
parentd1091c8bda41bb01c7dda45db96377d991639ecf (diff)
downloadgtk+-bdbd47818f3407748d8283919a2d89a7434808a7.tar.gz
docs: Add examples for use of GDK_VERSION_MIN_REQUIRED
I had to work this out for myself, so better document it.
Diffstat (limited to 'docs')
-rw-r--r--docs/reference/gtk/compiling.sgml16
1 files changed, 16 insertions, 0 deletions
diff --git a/docs/reference/gtk/compiling.sgml b/docs/reference/gtk/compiling.sgml
index 03206d9206..827e408a4e 100644
--- a/docs/reference/gtk/compiling.sgml
+++ b/docs/reference/gtk/compiling.sgml
@@ -64,6 +64,22 @@ this range will trigger compiler warnings.
</para>
<para>
+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_REQIRED=GDK_VERSION_3_2 `pkg-config --cflags --libs gtk+-3.0` hello.c -o hello
+</programlisting>
+</para>
+
+<para>
+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
+</programlisting>
+</para>
+
+<para>
The older deprecation mechanism of hiding deprecated interfaces
entirely from the compiler by using the preprocessor symbol
GTK_DISABLE_DEPRECATED is still used for deprecated macros,