unix网络编程卷2的头文件unpipc.h下载和编译(转)
2015-09-20 23:00
246 查看
http://blog.chinaunix.net/uid-27164517-id-3320677.html
1. 编译原书所带例子:
unpv22e.tar.gz 下载地址:http://www.kohala.com/start/unpv22e/unpv22e.tar.gz
2. 解压:
$tar -zxvf unpv22e.tar.gz
3. 编译:
$cd unpv22e
$ ./configure
$ cd lib
$ make
gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -odaemon_inetd.o daemon_inetd.c
In file included from /usr/include/netinet/in.h:23,
from /usr/include/rpc/types.h:90,
from /usr/include/rpc/rpc.h:41,
from unpipc.h:115,
from daemon_inetd.c:1:
/usr/include/stdint.h:49: 错误:重复的 'unsigned'
/usr/include/stdint.h:49: 错误:声明指定了两个以上的数据类型
/usr/include/stdint.h:50: 错误:重复的 'unsigned'
/usr/include/stdint.h:50: 错误:重复的 'short'
/usr/include/stdint.h:52: 错误:重复的 'unsigned'
/usr/include/stdint.h:52: 错误:声明指定了两个以上的数据类型
make: *** [daemon_inetd.o] 错误 1
修改unpipc.h第115行。unpipc.h中把115内容注释掉。再次编译。
$ make
gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -odaemon_inetd.o daemon_inetd.c
In file included from daemon_inetd.c:1:
unpipc.h:479: 错误:expected '=', ',', ';', 'asm' or '__attribute__'before '*' token
unpipc.h:480: 错误:expected ')' before '*' token
make: *** [daemon_inetd.o] 错误 1
把unpipc.h中第479,480行注释掉。再次编译。
$ make
...
gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -owrapsunrpc.o wrapsunrpc.c
wrapsunrpc.c:3: 错误:expected '=', ',', ';', 'asm' or'__attribute__' before '*' token
wrapsunrpc.c:16: 错误:expected ')' before '*' token
make: *** [wrapsunrpc.o] 错误 1
修改unpv22e/Make.defines中的LIB_OBJS的".o"文件,删除"wrapsunrpc.o"。
再次编译。
$ make
--这次应该没有问题了。
1. 编译原书所带例子:
unpv22e.tar.gz 下载地址:http://www.kohala.com/start/unpv22e/unpv22e.tar.gz
2. 解压:
$tar -zxvf unpv22e.tar.gz
3. 编译:
$cd unpv22e
$ ./configure
$ cd lib
$ make
gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -odaemon_inetd.o daemon_inetd.c
In file included from /usr/include/netinet/in.h:23,
from /usr/include/rpc/types.h:90,
from /usr/include/rpc/rpc.h:41,
from unpipc.h:115,
from daemon_inetd.c:1:
/usr/include/stdint.h:49: 错误:重复的 'unsigned'
/usr/include/stdint.h:49: 错误:声明指定了两个以上的数据类型
/usr/include/stdint.h:50: 错误:重复的 'unsigned'
/usr/include/stdint.h:50: 错误:重复的 'short'
/usr/include/stdint.h:52: 错误:重复的 'unsigned'
/usr/include/stdint.h:52: 错误:声明指定了两个以上的数据类型
make: *** [daemon_inetd.o] 错误 1
修改unpipc.h第115行。unpipc.h中把115内容注释掉。再次编译。
$ make
gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -odaemon_inetd.o daemon_inetd.c
In file included from daemon_inetd.c:1:
unpipc.h:479: 错误:expected '=', ',', ';', 'asm' or '__attribute__'before '*' token
unpipc.h:480: 错误:expected ')' before '*' token
make: *** [daemon_inetd.o] 错误 1
把unpipc.h中第479,480行注释掉。再次编译。
$ make
...
gcc -g -O2 -D_REENTRANT -Wall -D_POSIX_PTHREAD_SEMANTICS -c -owrapsunrpc.o wrapsunrpc.c
wrapsunrpc.c:3: 错误:expected '=', ',', ';', 'asm' or'__attribute__' before '*' token
wrapsunrpc.c:16: 错误:expected ')' before '*' token
make: *** [wrapsunrpc.o] 错误 1
修改unpv22e/Make.defines中的LIB_OBJS的".o"文件,删除"wrapsunrpc.o"。
再次编译。
$ make
--这次应该没有问题了。
相关文章推荐
- 在ROS中使用usb网络摄像头(usb_cam,Arch linux,ROS JADE)
- Android网络图片的三级缓存
- 黑马程序员——Java之网络通信
- 大端(网络字节序)与小端(主机字节序)存储
- HDU 5461 2015沈阳网络赛水题 Largest Point
- 黑马程序员——网络编程
- 如何在iOS上实现对HTTPS的支持
- https 之 ssl 证书
- 网管必备的十大网络安全测试工具
- HDU 5461 Largest Point(2015沈阳赛区网络赛+技巧水题)
- 网络营销推广的“三教九流”,你入了哪一流
- 自做CA自签发SSL证书 https
- 区别TCP会话的五元组
- 利用caffe训练网络的步骤
- ACE网络编程笔记(2):IPC SAP、ACE_SOCKET和TCP/IP通信实例
- ACE网络编程笔记(1):ACE自适配通信环境
- TCP和UDP之间的区别
- (转)TCP和UDP之间的区别
- 计算机等级考试-三级网络和二级C-查漏补缺
- ACM-ICPC国际大学生程序设计竞赛北京赛区(2015)网络赛有感