pthread编译出错解决方法

pthread-223.c:(.text+0x9e):对‘pthread_create’未定义的引用
pthread-223.c:(.text+0xfa):对‘pthread_join’未定义的引用

方法:

  gcc编译的时候应该加上 -pthread选项

 pthread-223.c:(.text+0x83):对‘assert’未定义的引用

方法:

   加上#include <assert.h>

猜你喜欢

转载自blog.csdn.net/shuzishij/article/details/85716538
今日推荐