开发者

Compiling w/glib2.0 on Ubuntu, I get g_thread_supported assertion failed

I thought GNU threads would be available when I install GLib, but maybe something is wrong? Here is how I installed glib on Ubuntu:

sudo apt-get install libglib2.0-dev 

When I run my code, it calls g_thread_开发者_Python百科pool_create, and glib says:

(process:22232): GLib-CRITICAL **: g_thread_pool_new: assertion `g_thread_supported ()' failed

Mind you my code definitely compiles and links just fine. It's just the assertion that's failing when I call g_thread_pool_new, and subsequently when I call g_thread_pool_push.


Did you call g_thread_init(NULL) to initialize the thread subsystem?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜