When I try to compile a C/C++ program I get this error:
undefined reference to `g_thread_init'
What can I do to fix this? I have installed libglib1.2-dev and libglib2.0-dev.
undefined reference to `g_thread_init'
try to link with pthread. Maybe that solves the problem (CFLAGS+=-lpthread)
don't know though
don't know though
Visit www.sceneproject.org
http://developer.gnome.org/doc/API/2.0/ ... hread-initTo use g_thread_init() in your program, you have to link with the libraries that the command pkg-config --libs gthread-2.0 outputs. This is not the case for all the other thread related functions of GLib. Those can be used without having to link with the thread libraries.
Thanks both. I added this at the end of the ./configure lines and it did wonders.
Code: Select all
CFLAGS="-pthread -lgthread-2.0 -lglib-2.0"