Mailinglist Archive: opensuse (1598 mails)

< Previous Next >
Re: [opensuse] where to place the library glib
  • From: David Haller <dnh@xxxxxxxxxxxx>
  • Date: Sat, 31 Oct 2009 23:25:50 +0100
  • Message-id: <20091031222550.GA6353@xxxxxxxxxxxxxxxxxx>

On Sat, 31 Oct 2009, Philipp Thomas wrote:
On Fri, 30 Oct 2009 21:48:10 -0300, you wrote:

It "works", but it is incorrect, if you export SUSE_ASNEEDED=1 (or link
with --as-needed it will break.

What's wrong with it, please expand a bit.

$ gcc -Wl,-t -Wl,--as-needed -Wall -W $(pkg-config --cflags \
--libs glib-2.0) glibtest.c -o glibtest
-lglib-2.0 (/usr/lib/gcc/i586-suse-linux/4.3/../../../
/tmp/ccMYnI9r.o: In function `main':
glibtest.c:(.text+0x19): undefined reference to `g_string_new'
glibtest.c:(.text+0x4b): undefined reference to `g_string_free'
collect2: ld returned 1 exit status
$ gcc -Wl,-t -Wl,--as-needed -Wall -W $(pkg-config --cflags glib-2.0) \
glibtest.c $(pkg-config --libs glib-2.0) -o glibtest
-lglib-2.0 (/usr/lib/gcc/i586-suse-linux/4.3/../../../

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >