Re: Simple glib compilation problem: DSO missing from command line
- From: Bruno Cauet <brunocauet gmail com>
- To: Nicola Fontana <ntd entidi it>
- Cc: gtk-app-devel-list gnome org
- Subject: Re: Simple glib compilation problem: DSO missing from command line
- Date: Fri, 27 Mar 2015 12:05:24 +0100
Thank you! I know it would be trivial for some people...
Nevermind about the attachments, the C version works fine anyway so the
problem probably comes from ctypes...
Have a nice day
2015-03-27 11:43 GMT+01:00 Nicola Fontana <ntd entidi it>:
Il Fri, 27 Mar 2015 11:31:59 +0100 Bruno Cauet <brunocauet gmail com>
scrisse:
Hi,
I'm having trouble compiling stuff with glib. Here it is:
$ LANG=C gcc -I /usr/include/glib-2.0 -I /usr/lib/glib-2.0/include -L
/usr/lib -l gio-2.0 segfault.c
/usr/bin/ld: /usr/lib/libgio-2.0.so: undefined reference to symbol
'g_object_unref'
/usr/lib/libgobject-2.0.so.0: error adding symbols: DSO missing from
command line
collect2: error: ld returned 1 exit status
Hi,
you are missing a couple of libraries from the command-line and the
order is wrong. To be on the safe side just use pkg-config:
$ LANG=C gcc $(pkg-config --cflags gio-2.0) segfault.c $(pkg-config --libs
gio-2.0)
You will find gio.c attached. There's related problems with solution on
the
internet but those solutions were related to the library inclusion order,
and I cannot adapt it to my case (single library in which the symbol is
also defined).
Nothing attached here.
Ciao.
--
Nicola
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]