QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1536|回复: 2

大家帮我看看这个是为什么?

[复制链接]
发表于 2009-3-23 13:04:04 | 显示全部楼层 |阅读模式
[root@localhost thread]# ls
Makefile  thread.c
[root@localhost thread]# gcc -o thread thread.c
/tmp/ccqJlBNV.o(.text+0xa6): In function `main':
: undefined reference to `pthread_create'
/tmp/ccqJlBNV.o(.text+0xde): In function `main':
: undefined reference to `pthread_create'
/tmp/ccqJlBNV.o(.text+0x111): In function `main':
: undefined reference to `pthread_join'
/tmp/ccqJlBNV.o(.text+0x121): In function `main':
: undefined reference to `pthread_join'
collect2: ld returned 1 exit status

我包含头文件<pthread.h>了,为什么还是不行?
 楼主| 发表于 2009-3-23 13:06:26 | 显示全部楼层

谢谢大家了

希望大家帮我看看,我初学。

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

×
回复

使用道具 举报

发表于 2009-3-23 19:04:59 | 显示全部楼层
so 路径有问题。导致编译器找不到库接口。
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-4-17 03:13 , Processed in 0.152955 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

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