pb in compilation with threads...



hi,

i would like to use threads, but i have this error during compilation:
main.c:19: undefined reference to `g_thread_init'

the main is :
int
main (int argc, char *argv[])
{
#ifndef G_THREADS_ENABLED
#error "This program needs a version of Glib which supports threads"
#else

  GtkWidget *win;

  g_thread_init(NULL);
  gtk_set_locale ();
  gtk_init (&argc, &argv);

  mainwin = NULL;
  win = create_mainwin();
  if (!win)
    return EXIT_FAILURE;

  gtk_widget_show (win);
  gdk_threads_enter();
  gtk_main ();
  gdk_threads_leave();

#endif

  return EXIT_SUCCESS;
}


i have tried to recompile the glib, but it is the same!!!

why???





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