摘要: 在编译中要加 -lpthread或-pthread参数(不同版本的gcc可能不一样,man gcc可以查阅对应参数)。 例如:在加了头文件#include <pthread.h>之后执行 pthread.c文件,需要使用如下命令: gcc -lpthread -o thread thread.c 或 阅读全文
posted @ 2016-10-21 17:13 jeremyatchina 阅读(249) 评论(0) 推荐(0) 编辑