codeblocks编译pthread多线程问题

默认的编译选项是没有pthread的,所以要自己添加:

参考:http://hi.baidu.com/u_soa/item/9d6cc40b7e9d76eb3499024d

错误:

undefined reference to 'pthread_create'

解决:

Project -> Build options -> Linker settings -> Link libraries 里加上pthread

posted @ 2017-06-21 11:04  丁培飞  阅读(294)  评论(0编辑  收藏  举报