Linux C/C++编程:《UNIX环境高级编程》第三版源码编译centos7

第一版

  1. 下载源代码
    http://apuebook.com/code3e.html

  2. 解压

$ tar -xvf src.3e.tar.gz
$ cd apue.3e/
$ cat README 
Read the file called DISCLAIMER.

On Freebsd, type "gmake".
On other platforms, type "make" (as long as this is gnu make).

For FAQs, updated source code, and the lost chapter, see http://www.apuebook.com.
Please direct questions, suggestions, and bug reports to sar@apuebook.com.

Steve Rago
January 2013
  1. 编译
$ make
/tmp/ccdItTCm.o:在函数‘thr_fn’中:
barrier.c:(.text+0x80):对‘heapsort’未定义的引用
collect2: 错误:ld 返回 1
make[1]: *** [barrier] 错误 1
make[1]: 离开目录“/home/oceanstar/CLionProjects/apue.3e/threads”
make: *** [all] 错误 1
$ yum install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm
$ yum install libbsd libbsd-devel
$ make
$ cp ./include/apue.h /usr/include/
$ cp ./lib/libapue.a /usr/lib
$ cp ./lib/libapue.a /usr/local/lib
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值