【发布时间】:2016-07-22 20:17:16
【问题描述】:
我正在尝试执行以下程序-
APUE.3E -> filedir -> filetype.c内(我下载APUE.3E时默认出现的。我没有做任何更改)
但是当我编译时这是我收到的错误:
myramya~/Documents/apue.3e/filedir$ gcc filetype.c -lm -o filetype
/tmp/cchPKE7K.o: In function main':
filetype.c:(.text+0x94): undefined reference to err_ret'
collect2: error: ld returned 1 exit status
我正在使用 Linux Ubuntu。我已经在 Documents 文件夹中安装了 APUE.3E。我有管理员权限。我编写了一个简单的 Hello.c 程序并使用:
$ gcc hello.c -o hello
它没有任何问题。
【问题讨论】: