unix环境高级编程apue.h文件头的安装
2018-01-14 15:59
357 查看
工作了,以前只停留在pad里的书都想入手。手里有了unix网络编程卷1卷2,最近看ceph源码的过程中,越来越发现需要补充unix环境高级编程的知识。
从pad中走向了实体书。中午快递到货,迫不及待的翻开了。第一件事,安装
一make,果然报错,人生啊总是要走很多“弯”路。
在这里缺少一个libbsd
下载
安装
从pad中走向了实体书。中午快递到货,迫不及待的翻开了。第一件事,安装
#include"apue.h"
1.官网下载
下载传送门2.解压make
安装点依赖gcc make啥的一make,果然报错,人生啊总是要走很多“弯”路。
/tmp/ccMkguDl.o: In function `thr_fn': barrier.c:(.text+0x80): undefined reference to `heapsort' collect2: error: ld returned 1 exit status make[1]: *** [barrier] Error 1 make[1]: Leaving directory `/root/apue.3e/threads' make: *** [all] Error 1 [root@localhost apue.3e]# yum update Loaded plugins: fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.cn99.com * epel: mirror.lzu.edu.cn * extras: mirrors.shu.edu.cn * updates: mirrors.cn99.com No packages marked for update
在这里缺少一个libbsd
下载
wget http://elrepo.reloumirrors.net/testing/el6/x86_64/RPMS/libbsd-devel-0.2.0-4.el6.elrepo.x86_64.rpm wget http://elrepo.reloumirrors.net/testing/el6/x86_64/RPMS/libbsd-0.2.0-4.el6.elrepo.x86_64.rpm
安装
rpm -ivh libbsd-0.2.0-4.el6.elrepo.x86_64.rpm rpm -ivh libbsd-devel-0.2.0-4.el6.elrepo.x86_64.rpm
3.重新make
成功4.加入include
将apue.h中加入#include”error.c”void log_exit(int, const char *, ...) __attribute__((noreturn)); void TELL_WAIT(void); /* parent/child from {Sec race_conditions} */ void TELL_PARENT(pid_t); void TELL_CHILD(pid_t); void WAIT_PARENT(void); void WAIT_CHILD(void); #include"error.c" #endif /* _APUE_H */
cp include/apue.h lib/error.c /usr/include/
相关文章推荐
- UNIX环境高级编程Apue.h文件的配置
- Unix环境高级编程apue.h文件问题,与运行第一个程序
- UNIX 环境高级编程(一) apue.h 文件与apue.3e的安装
- Unix环境高级编程apue.h
- ubuntu上联系Unix环境高级编程-apue.h的配置与安装
- unix环境高级编程笔记(5)—— 文件和目录(2)
- UNIX环境高级编程-第3章- 文件I/O
- UNIX环境高级编程复习——文件和目录(3)
- UNIX环境高级编程之第4章:文件和目录
- unix环境高级编程-文件IO
- UNIX环境高级编程之第4章:文件和目录-习题
- UNIX环境高级编程学习之第三章文件IO-文件读操作
- unix环境高级编程中的例子-----递归降序遍历目录层次结构,并按文件类型计数
- UNIX环境高级编程-读书笔记-文件操作(二)
- apue.h头文件(UNIX环境高级编程)
- UNIX环境高级编程读书笔记(一)—文件IO (1)
- <<UNIX环境高级编程>>apue.h头文件的配置
- unix环境高级编程-系统是如何设置文件权限的
- UNIX环境高级编程(5):文件I/O(1)
- Unix环境高级编程第三章文件I/O摘记