<>第三章的一个程序编译不通过 ,大家看看了。

yutongjun108 yutongjun108 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
源代码如下:
#include <sys/types.h>
#include "ourhdr.h"
int
main(void)
{
if(lseek(STDIN_FILENO,0,SEEK_CUR)==-1)
err_sys("cannot seek\n");
else
err_sys("seek ok\n");
exit(0);
}
用gcc编译后的结果是
/tmp/ccFqGnWH.o: In function `main':
/tmp/ccFqGnWH.o(.text+0x27): undefined reference to `err_sys'
/tmp/ccFqGnWH.o(.text+0x39): undefined reference to `err_sys'
collect2: ld returned 1 exit status





...全文

相关推荐

评论 8
收藏 已收藏
分享
返回顶部
yutongjun108
Linux/Unix社区 23,224 成员 74,535 内容