complie error
- From: yeajchao <yeajchao yahoo com cn>
- To: gtk-app <gtk-app-devel-list gnome org>,	gtk-list <gtk-list gnome org>
- Cc: 
- Subject: complie error
- Date: Thu, 17 Nov 2005 13:07:51 +0800 (CST)
Hello all
   I encountered a simple problem while compile a
simple program
    the program and the complie infomation as follow
/**************************************************/
#include<gtk/gtk.h>
int main (int argc, char **argv)
{
  GtkWidget *window;
  /* init threads */	
  g_thread_init(NULL);
  gdk_threads_init();
  
  /* init gtk */
  gtk_init(&argc, &argv);
  window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
  gtk_widget_show(window);
  gdk_threads_enter();
  gtk_main();
  gdk_threads_leave();
  return 0;
}
/*************************************************/
and the complier told  me that
/*-----------------------------------------------*/
/tmp/cc1s1xqZ.o(.text+0x16): In function `main':
: undefined reference to `g_thread_init'
collect2: ld returned 1 exit status
/*-----------------------------------------------*/
I do not know what's wrrong in my program
when i delete the g_thread_init function from my
program,
   it will complie succesfully
but when i run the object file
 it failed
Can anybody help me?
Thanks in advance!
__________________________________________________
赶快注册雅虎超大容量免费邮箱?
http://cn.mail.yahoo.com
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]