mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-01-14 08:16:24 +01:00
Remove mention of gthread-2.0.pc from 'Compiling' section
At the same time, add one or two other corrections.
This commit is contained in:
parent
749758ec78
commit
47c7fa2ccd
@ -36,30 +36,35 @@ $ pkg-config --libs glib-2.0
|
|||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If your application uses threads or <structname>GObject</structname>
|
See the <ulink url="http://www.freedesktop.org/wiki/Software/pkg-config">pkg-config website</ulink>
|
||||||
features, it must be compiled and linked with the options returned by the
|
for more information about <application>pkg-config</application>.
|
||||||
following <application>pkg-config</application> invocations:
|
</para>
|
||||||
|
<para>
|
||||||
|
If your application uses or <structname>GObject</structname>
|
||||||
|
features, it must be compiled and linked with the options returned
|
||||||
|
by the following <application>pkg-config</application> invocation:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
$ pkg-config --cflags --libs gthread-2.0
|
|
||||||
$ pkg-config --cflags --libs gobject-2.0
|
$ pkg-config --cflags --libs gobject-2.0
|
||||||
</programlisting>
|
</programlisting>
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
If your application uses modules, it must be compiled and linked with the options
|
If your application uses modules, it must be compiled and linked
|
||||||
returned by one of the following <application>pkg-config</application> invocations:
|
with the options returned by one of the following
|
||||||
|
<application>pkg-config</application> invocations:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
$ pkg-config --cflags --libs gmodule-no-export-2.0
|
$ pkg-config --cflags --libs gmodule-no-export-2.0
|
||||||
$ pkg-config --cflags --libs gmodule-2.0
|
$ pkg-config --cflags --libs gmodule-2.0
|
||||||
</programlisting>
|
</programlisting>
|
||||||
The difference between the two is that gmodule-2.0 adds <option>--export-dynamic</option>
|
The difference between the two is that gmodule-2.0 adds
|
||||||
to the linker flags, which is often not needed.
|
<option>--export-dynamic</option> to the linker flags,
|
||||||
|
which is often not needed.
|
||||||
</para>
|
</para>
|
||||||
<para>
|
<para>
|
||||||
The simplest way to compile a program is to use the "backticks"
|
The simplest way to compile a program is to use the "backticks"
|
||||||
feature of the shell. If you enclose a command in backticks
|
feature of the shell. If you enclose a command in backticks
|
||||||
(<emphasis>not single quotes</emphasis>), then its output will be
|
(<emphasis>not single quotes</emphasis>), then its output will
|
||||||
substituted into the command line before execution. So to compile
|
be substituted into the command line before execution. So to
|
||||||
a GLib Hello, World, you would type the following:
|
compile a GLib Hello, World, you would type the following:
|
||||||
<programlisting>
|
<programlisting>
|
||||||
$ cc `pkg-config --cflags --libs glib-2.0` hello.c -o hello
|
$ cc `pkg-config --cflags --libs glib-2.0` hello.c -o hello
|
||||||
</programlisting>
|
</programlisting>
|
||||||
@ -75,11 +80,15 @@ by using the command line option <literal>-DG_DISABLE_DEPRECATED=1</literal>.
|
|||||||
The recommended way of using GLib has always been to only include the
|
The recommended way of using GLib has always been to only include the
|
||||||
toplevel headers <filename>glib.h</filename>,
|
toplevel headers <filename>glib.h</filename>,
|
||||||
<filename>glib-object.h</filename>, <filename>gio.h</filename>.
|
<filename>glib-object.h</filename>, <filename>gio.h</filename>.
|
||||||
Still, there are some exceptions; these headers have to be included separately:
|
Still, there are some exceptions; these headers have to be included
|
||||||
|
separately:
|
||||||
<filename>gmodule.h</filename>,
|
<filename>gmodule.h</filename>,
|
||||||
<filename>glib/gi18n-lib.h</filename> or <filename>glib/gi18n.h</filename> (see
|
<filename>glib-unix.h</filename>,
|
||||||
|
<filename>glib/gi18n-lib.h</filename> or
|
||||||
|
<filename>glib/gi18n.h</filename> (see
|
||||||
the <link linkend="glib-I18N">Internationalization section</link>),
|
the <link linkend="glib-I18N">Internationalization section</link>),
|
||||||
<filename>glib/gprintf.h</filename> and <filename>glib/gstdio.h</filename>
|
<filename>glib/gprintf.h</filename> and
|
||||||
|
<filename>glib/gstdio.h</filename>
|
||||||
(we don't want to pull in all of stdio).
|
(we don't want to pull in all of stdio).
|
||||||
</para>
|
</para>
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user