Chinaunix首页 | 论坛 | 博客
  • 博客访问: 1083677
  • 博文数量: 190
  • 博客积分: 1156
  • 博客等级: 少尉
  • 技术积分: 2153
  • 用 户 组: 普通用户
  • 注册时间: 2011-01-16 15:01
个人简介

go!go!go!

文章分类

全部博文(190)

文章存档

2023年(11)

2022年(13)

2021年(15)

2020年(38)

2019年(3)

2018年(6)

2016年(1)

2015年(16)

2014年(13)

2013年(24)

2012年(46)

分类: C/C++

2012-02-20 12:07:51

错误入下:
comm.c: In function commSetCork:
error: TCP_NODELAY undeclared (first use in this function)



问题定位:
1.google上述错误码后,大概确定TCP_NODELAY由于tcp.h这个头文件引起的
2.执行如下命令

  1. locate tcp.h
得到一些tcp.h的具体路径如下:

  1. /usr/include/netinet/tcp.h
  2. /usr/include/linux/tcp.h
  3. /usr/include/imap/tcp.h


3.在comm.c中有如下代码

  1. #ifdef HAVE_NETINET_TCP_H
  2. #include <netinet/tcp.h>
  3. #endif
所以将确定应该是netinet/tcp.h
的问题

4.查看该机器版本相同的机器,若版本相同,则将netinet/tcp.h直接拷贝过来
编译通过。

阅读(2070) | 评论(3) | 转发(1) |
0

上一篇:没有了

下一篇:gdb用法

给主人留下些什么吧!~~

认真的鱼1232012-03-12 07:25:18

多谢啦!

jiuniu1102012-02-28 23:57:24

认真的鱼123: 机器版本怎么看啊?.....
请查看http://blog.chinaunix.net/space.php?uid=23145525&do=blog&id=3085705

认真的鱼1232012-02-20 21:37:38

机器版本怎么看啊?