1 1. 编译原书所带例子:
 2   unpv22e.tar.gz 下载地址:http://www.kohala.com/start/unpv22e/unpv22e.tar.gz
 3   2. 解压:
 4   $tar -zxvf unpv22e.tar.gz
 5   3. 编译:
 6   $cd unpv22e
 7   $ ./configure
 8   $ cd lib
 9   $ make
10   gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -o daemon_inetd.o daemon_inetd.c
11   In file included from /usr/include/netinet/in.h:23,
12   from /usr/include/rpc/types.h:90,
13   from /usr/include/rpc/rpc.h:41,
14   from unpipc.h:115,
15   from daemon_inetd.c:1:
16   /usr/include/stdint.h:49: 错误:重复的 'unsigned'
17   /usr/include/stdint.h:49: 错误:声明指定了两个以上的数据类型
18   /usr/include/stdint.h:50: 错误:重复的 'unsigned'
19   /usr/include/stdint.h:50: 错误:重复的 'short'
20   /usr/include/stdint.h:52: 错误:重复的 'unsigned'
21   /usr/include/stdint.h:52: 错误:声明指定了两个以上的数据类型
22   make: *** [daemon_inetd.o] 错误 1
23   这时需要修改unpipc.h第115行。unpipc.h中把115内容注释掉。再次编译。
24   $ make
25   gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -o daemon_inetd.o daemon_inetd.c
26   In file included from daemon_inetd.c:1:
27   unpipc.h:479: 错误:expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
28   unpipc.h:480: 错误:expected ')' before '*' token
29   make: *** [daemon_inetd.o] 错误 1
30   再次出现错误,把unpipc.h中第479,480行注释掉。再次编译。
31   $ make
32   ...
33   gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -o wrapsunrpc.o wrapsunrpc.c
34   wrapsunrpc.c:3: 错误:expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
35   wrapsunrpc.c:16: 错误:expected ')' before '*' token
36   make: *** [wrapsunrpc.o] 错误 1
37   这时还会出现上面的错误,这时需要修改unpv22e/Make.defines中的LIB_OBJS的".o"文件,删除"wrapsunrpc.o"。
38   再次编译。
39   $ make
40   --这次应该没有问题了。

参考地址            http://blog.chinaunix.net/uid-27164517-id-3320677.html

下载的源码有些头文件没有,不过在lib里面按照上面修改之后基本能跑起来例子程序。

转载于:https://www.cnblogs.com/kongchung/p/4789146.html

unix network programming volume 2 interprocess communications second edition环境搭建出错的处理...相关推荐

  1. Unix NetWork Programming——环境搭建(解决unp.h等源码编译问题)(转载)

    原文地址:http://blog.csdn.net/a649518776/article/details/6724121 下面开始用简单但典型的客户端和服务器端程序说明如何进行网络编程.这一小节讲的是 ...

  2. unix network programming volume1 sorce code build and get(UNIX網絡編程卷1第三版)

    source code下载地址:unpv13e.tar.gz下载 (也有放一份在google cloud storage) compile 1. ./configure 2. cd lib make ...

  3. Python socket – network programming tutorial

    原文: https://www.binarytides.com/python-socket-programming-tutorial/ -------------------------------- ...

  4. 【Deep Learning 二】课程一(Neural Networks and Deep Learning),第二周(Basics of Neural Network programming)答案

    课程一(Neural Networks and Deep Learning),第二周(Basics of Neural Network programming)答案 ----------------- ...

  5. 第一节课-第二周:神经网络的编程基础(Basics of Neural Network programming)

    二.神经网络的编程基础(Basics of Neural Network programming) 2.1 二分类(Binary Classification) 2.2 逻辑回归(Logistic R ...

  6. 《吴恩达深度学习》学习笔记002_神经网络的编程基础(Basics of Neural Network programming)

    http://www.ai-start.com/dl2017/html/lesson1-week2.html 神经网络的编程基础(Basics of Neural Network programmin ...

  7. python network programming tutorial

    关于网络编程以及socket 等一些概念和函数介绍就不再重复了,这里示例性用python 编写客户端和服务器端. 一.最简单的客户端流程: 1. Create a socket 2. Connect ...

  8. linux unix shell programming,UNIX Shell Programming, 4th Edition

    摘要: Harness the power of shells . . . for the Internet and beyondCompletely revised and updated to i ...

  9. 【2021年新书推荐】Network Programming with Go

    各位好,此账号的目的在于为各位想努力提升自己的程序员分享一些全球最新的技术类图书信息,今天带来的是2021年2月由No Starch Press出版社最新出版的一本关于go语言的书. Network ...

最新文章

  1. qt能使用logback_SpringBoot 中使用 LogBack 配置
  2. WebForm 使用点滴。。。。
  3. D3 updateenterexit
  4. ECMAScript 6学习总结(1)——ECMAScript 6入门简介
  5. winform 开发涉及到的问题
  6. 体重控制补品行业调研报告 - 市场现状分析与发展前景预测
  7. 运用EL表达式进行复杂比较(在JSTL中调用函数)
  8. sap事务代码_SAP成本模块常用事务代码清单
  9. PySlowFast 视频理解代码库
  10. python mount回调函数_python类(4)——自己造第一个轮子
  11. 【基础教程】关于matlab GUI重命名的问题【739期】
  12. 我的联想拯救者y7000p怎么安装双系统Linux ubuntu 18.04呢?
  13. matlab插值表,[转载]matlab插值介绍
  14. Android ANR的trace文件基本信息解读
  15. Win10截图快捷键教程
  16. 搜狗输入法低版本导致谷歌浏览器上传下载时崩溃
  17. 文本分类——KNN算法
  18. 爬虫03 —— 正则表达式
  19. springboot毕设项目永川一心一房地产平台95ho0(java+VUE+Mybatis+Maven+Mysql)
  20. 三、简单刷题APP(题库是Excel)之在APP添加题目

热门文章

  1. 谷歌医疗AI商业化提速!Jeff Dean亲自挖来大总管
  2. 波士顿动力新视频:上岗工作机器狗,巡查工地一丝不苟
  3. 托微软的福,谷歌把GitLab捧成了独角兽
  4. 企业生产环境数据库备份锁表问题
  5. 如何确保使用jdk8编译后的class能够在jdk7上运行?
  6. spark源码分析之任务调度篇
  7. 探秘ReSharper 8新功能——XAML编辑
  8. 【C#】【MySQL】C# 查询数据库语句@Row:=@Row+1以及执行存储过程失败解决方案
  9. Django 现可在 Windows Azure 上使用
  10. 补充轻量级持久层V2版本的测试页面模板与实体类模板