codeblocks编译pthread问题

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

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

错误:

undefined reference to 'pthread_create'

解决:

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

这样就解决啦!非常感谢老游网友!

原文地址:https://www.cnblogs.com/xiangshancuizhu/p/3335728.html