unix 环境高级编程第三版 源码无法 make 成功, 对‘heapsort’未定义的引用 -apue.3e

Posted xinfenglee

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了unix 环境高级编程第三版 源码无法 make 成功, 对‘heapsort’未定义的引用 -apue.3e相关的知识,希望对你有一定的参考价值。

http://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/

我的环境是centos7 x86_64

查看方法:

[[email protected] ~]# uname -a
Linux localhost.localdomain 3.10.0-693.el7.x86_64 #1 SMP Tue Aug 22 21:09:27 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

找到对应的rpm ,下载进行安装即可

[[email protected] tmp]# yum install libbsd-0.6.0-3.el7.x86_64.rpm
Loaded plugins: fastestmirror
Examining libbsd-0.6.0-3.el7.x86_64.rpm: libbsd-0.6.0-3.el7.x86_64
Marking libbsd-0.6.0-3.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package libbsd.x86_64 0:0.6.0-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================================
Installing:
libbsd x86_64 0.6.0-3.el7 /libbsd-0.6.0-3.el7.x86_64 193 k

Transaction Summary
====================================================================================================================================================================
Install 1 Package

Total size: 193 k
Installed size: 193 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libbsd-0.6.0-3.el7.x86_64 1/1
Verifying : libbsd-0.6.0-3.el7.x86_64 1/1

Installed:
libbsd.x86_64 0:0.6.0-3.el7

Complete!
[[email protected] tmp]# yum install libbsd-devel-0.6.0-3.el7.x86_64.rpm
Loaded plugins: fastestmirror
Examining libbsd-devel-0.6.0-3.el7.x86_64.rpm: libbsd-devel-0.6.0-3.el7.x86_64
Marking libbsd-devel-0.6.0-3.el7.x86_64.rpm to be installed
Resolving Dependencies
--> Running transaction check
---> Package libbsd-devel.x86_64 0:0.6.0-3.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

====================================================================================================================================================================
Package Arch Version Repository Size
====================================================================================================================================================================
Installing:
libbsd-devel x86_64 0.6.0-3.el7 /libbsd-devel-0.6.0-3.el7.x86_64 160 k

Transaction Summary
====================================================================================================================================================================
Install 1 Package

Total size: 160 k
Installed size: 160 k
Is this ok [y/d/N]: y
Downloading packages:
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libbsd-devel-0.6.0-3.el7.x86_64 1/1
Verifying : libbsd-devel-0.6.0-3.el7.x86_64 1/1

Installed:
libbsd-devel.x86_64 0:0.6.0-3.el7

Complete!

 

回到apue.3e目录下重新make 即可

[[email protected] apue.3e]# pwd
/usr/src/apue.3e

 

apue.3e解压放在/usr/src目录下

 


















































以上是关于unix 环境高级编程第三版 源码无法 make 成功, 对‘heapsort’未定义的引用 -apue.3e的主要内容,如果未能解决你的问题,请参考以下文章

Linux - Unix环境高级编程(第三版) 代码编译

UNIX环境高级编程(第三版)头文件“apue.h“问题

《UNIX环境高级编程》源码配置——apue.3e 安装

Linux - Unix环境高级编程(第三版) 源代码编译(即头文件apue.h如何使用问题)

《unix环境高级编程·第三版》源代码编译及使用

unix环境高级编程(第三版)中apue.h文件的配置问题