Re: Compiling glib applications [PATCH]



Ok, here is an updated patch.

On 10/08/12 16:04, Lanoxx wrote:

On 10/08/12 15:58, Emmanuele Bassi wrote:
hi;

On 10 August 2012 14:55, Lanoxx <lanoxx gmx net> wrote:
Something like:
./autogen.sh
./configure --prefix=/usr --with-html-dir=html
you missed --enable-gtk-doc
Thanks. I will give it a try.
This has worked, not but all the html ended up in docs/reference/glib/html, my option --with-html-dir was ignored:

./configure --prefix=/usr --with-html-dir=html_output --enable-gtk-doc

./make sgml
./make html

If I understand the readme correctly that should work, but it doesnt.
no, it won't be enough, given that the documentation will need the
library to be built as well.

if you pass --enable-gtk-doc to the configure script and then 'make',
it will build the documentation as well.
We should also update the README in docs/reference/ to reflect this.

ciao,
  Emmanuele.


_______________________________________________
desktop-devel-list mailing list
desktop-devel-list gnome org
https://mail.gnome.org/mailman/listinfo/desktop-devel-list


>From 241deed4c0fe303c80f1d728181218b92ab21bf9 Mon Sep 17 00:00:00 2001
From: Sebastian Geiger <sbastig gmx net>
Date: Thu, 9 Aug 2012 23:01:29 +0200
Subject: [PATCH] compiling.xml: Add note and fix gcc example

Because of the '--as-needed' default option
for the linker, the linking will fail, if the
file name appears after any of the options or
the pkg-config invocation.
---
 docs/reference/glib/compiling.xml |    5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/docs/reference/glib/compiling.xml b/docs/reference/glib/compiling.xml
index 9add70b..51ebe0f 100644
--- a/docs/reference/glib/compiling.xml
+++ b/docs/reference/glib/compiling.xml
@@ -66,9 +66,12 @@ feature of the shell. If you enclose a command in backticks
 be substituted into the command line before execution. So to
 compile a GLib Hello, World, you would type the following:
 <programlisting>
-$ cc `pkg-config --cflags --libs glib-2.0` hello.c -o hello
+$ cc hello.c `pkg-config --cflags --libs glib-2.0` -o hello
 </programlisting>
 </para>
+<note><para>
+Note that the name of the file must come before the other options (such as <emphasis>pkg-config</emphasis>), or else you may get an error from the linker.
+</para></note>
 
 <para>
 Deprecated GLib functions are annotated to make the compiler
-- 
1.7.9.5



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