undefined reference to 'pthread_create'问题解决

出现问题

undefined reference to 'pthread_create'
undefined reference to 'pthread_join'

 

修改在编译时:加上 -lpthread

 

gcc  -o thread thread.c  -lpthread

posted @ 2012-03-08 21:16  smart900613  阅读(204)  评论(0编辑  收藏  举报