Re: pthreads + gtk



> First the example "gtk-thread.c" doesn't compile with the command they 
> advertise, but it works with the additional library added "gdk-x11-2.0"
> 
> $ gcc gtk-thread.c -lgdk-x11-2.0 `gtk-config --cflags --libs gthread`

Are you really saying that you are mixing gtk-config (from gtk+ 1.2) and
Gtk+ 2.0 libraries ?

No wonder it doesn't work ;-)

> But it fails with g++
> 
> $ g++ gtk-thread.cpp -lgdk-x11-2.0 `gtk-config --cflags --libs gthread`
> thread.c: In function `int main (int, char **)':
> thread.c:99: `gdk_threads_init' undeclared (first use this function)
> thread.c:99: (Each undeclared identifier is reported only once for each
> function it appears in.)
> 
> any hints?  I've done all my coding in C++

Hint: C++ is a different language than C.
Also, we can't guess what gtk-thread.cpp and thread.c look like.

Arno



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