You are here

Add new comment

Salut Tarnyko,

I followed your tut step by step. Everthing seems to be so smooth but in during comilation i got this compiler error:

#$ i586-mingw32msvc-gcc /home/spivvi/Desktop/test.c -o test.exe `pkg-config --cflags --libs gtk+-3.0`
i586-mingw32msvc-gcc: unrecognized option '-pthread'
In file included from /usr/include/glib-2.0/glib.h:108,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
from /usr/include/gtk-3.0/gdk/gdk.h:30,
from /usr/include/gtk-3.0/gtk/gtk.h:30,
from /home/spivvi/Desktop/test.c:1:
/usr/include/glib-2.0/glib/deprecated/gthread.h:123:21: error: pthread.h: No such file or directory
In file included from /usr/include/glib-2.0/glib.h:108,
from /usr/include/gtk-3.0/gdk/gdkconfig.h:13,
from /usr/include/gtk-3.0/gdk/gdk.h:30,
from /usr/include/gtk-3.0/gtk/gtk.h:30,
from /home/spivvi/Desktop/test.c:1:
/usr/include/glib-2.0/glib/deprecated/gthread.h:133: error: expected specifier-qualifier-list before ‘pthread_mutex_t’
/usr/include/glib-2.0/glib/deprecated/gthread.h:162: error: expected specifier-qualifier-list before ‘pthread_t’
In file included from /usr/include/glib-2.0/gio/gio.h:47,
from /usr/include/gtk-3.0/gdk/gdkapplaunchcontext.h:28,
from /usr/include/gtk-3.0/gdk/gdk.h:32,
from /usr/include/gtk-3.0/gtk/gtk.h:30,
from /home/spivvi/Desktop/test.c:1:

My test.c file contains this:

#include
void main (int argc, char *argv[]) {
GtkWidget *window;
gtk_init (&argc, &argv);
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Hello World");
gtk_widget_show (window);
gtk_main ();
}

I'm on Ubuntu12.04LTS.

dpkg -l | grep -i pthread
ii libevent-pthreads-2.0-5 2.0.16-stable-1 Asynchronous event notification library (pthreads)
ii libpthread-stubs0 0.3-3 pthread stubs not provided by native libc
ii libpthread-stubs0-dev 0.3-3 pthread stubs not provided by native libc, development files
ii libpthread-workqueue-dev 0.8.2-1 thread pool library (development files)
ii libpthread-workqueue0 0.8.2-1 thread pool library

Do you have any clue on this issue?
Thanks splivv.

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.