-
解压
$ 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
- 编译
$ 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