Re: pthreads + gtk



NavEcos wrote:

I appreciate the tip, but then I get the following:

$ gcc thread.cpp `pkg-config --cflags --libs gtk+-2.0` -lpthread

produces

/tmp/ccwLDn5O.o: In function `main':
/tmp/ccwLDn5O.o(.text+0x18c): undefined reference to `g_thread_init'
collect2: ld returned 1 exit status

So what library contains g_thread_init?

Use the following:
gcc thread.cpp `pkg-config --cflags --libs gtk+-2.0 gthread`
You dont need to include -lpthread.

Olexiy




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