why my program quit when I use g_thread?



when I add these code,my program will crash at the
start, and report segments falt?:

if (!g_thread_supported())
g_thread_init();

gdk_thread_enter();
gtk_set_local();
gtk_init();
/* init my gtk window here */
gtk_main();
gdk_thread_leave();
return;

But it work fine if I remove these and use single thread?

_________________________________________________________
Do You Yahoo!?
150万曲MP3疯狂搜,带您闯入音乐殿堂
http://music.yisou.com/
美女明星应有尽有,搜遍美图、艳图和酷图
http://image.yisou.com
1G就是1000兆,雅虎电邮自助扩容!
http://cn.rd.yahoo.com/mail_cn/tag/1g/*http://cn.mail.yahoo.com/event/mail_1g/



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