Re: Glib linking error: undefined reference to ...
- From: Patrick Welche <prlw1 cam ac uk>
- To: Christian Arnold <chrarnold web de>
- Cc: gtk-list gnome org
- Subject: Re: Glib linking error: undefined reference to ...
- Date: Mon, 20 Feb 2012 13:26:43 +0000
On Fri, Feb 17, 2012 at 12:20:22AM +0100, Christian Arnold wrote:
> glibTest.c:24: undefined reference to `g_timer_new'
> glibTest.c:32: undefined reference to `g_random_double'
> glibTest.c:36: undefined reference to `g_timer_stop'
> glibTest.c:55: undefined reference to `g_str_hash'
> ...
>
> I compile with:
> "gcc `pkg-config --cflags --libs glib-2.0` -g3 -O2 -std=c99 -Wall
> -pedantic glibTest.c -o glibTest
>
> pkg-config --cflags --libs glib-2.0 gives me:
> -I/usr/local/include/glib-2.0 -I/usr/local/lib/glib-2.0/include
> -L/usr/local/lib -lglib-2.0
Maybe we need to check that what is in /usr/local/lib is the new ?2.30?
version you expect? e.g.
ls /usr/local/lib/libglib-2.0*
nm -g /usr/local/lib/libglib-2.0.3000.2 | grep g_timer_new
(or whatever the library ends up being called)
?
Cheers,
Patrick
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]