LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 665|回复: 1

请教线程

[复制链接]
发表于 2005-6-30 11:48:49 | 显示全部楼层 |阅读模式
#1  请教线程

我已经有头文件了
#include <pthread.h>
可gcc时出现:
/tmp/cciNsnAk.o: In function `main':
/tmp/cciNsnAk.o(.text+0x17): undefined reference to `pthread_create'
/tmp/cciNsnAk.o(.text+0x55): undefined reference to `pthread_create'
/tmp/cciNsnAk.o(.text+0x8d): undefined reference to `pthread_join'
/tmp/cciNsnAk.o(.text+0x9d): undefined reference to `pthread_join'
collect2: ld returned 1 exit status
请教拉
发表于 2005-6-30 12:45:19 | 显示全部楼层
没有连接pthread库? -lpthread加入gcc的命令行.
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表