2011-10-14 34 views
1

我正在使用cygwin编译网络工具(iffinder)。编译cygwin下的icmp相关代码(缺少“icmp”结构)

经过./configuremake我有一个问题,我猜与struct icmp有关。头文件中的icmp结构在哪里。我在cygwin头文件中搜索它,但我没有找到任何东西。

如何在cygwin中编译需要icmp的源代码?

如果有帮助,你可以找到的源代码iffinderhere

注:我在Cygwin的头文件ip_icmp.h


编译错误:

iffinder.c:1059: warning: "struct icmp" declared inside parameter list

iffinder.c:1059: warning: its scope is only this definition or

declaration, which is probably not what you want iffinder.c: In

function `handle_icmp_error': iffinder.c:1069: error: dereferencing

pointer to incomplete type

...

回答

2

在cygwin中,icmp.h是空的。我建议你从一个开源项目中复制一个icmp.h,然后用你的项目进行编译。也许,你有很多错误,你必须纠正它们,但你只需要一个icmp结构,它会解决你的问题。

0

iffinder.c线54确实#include <netinet/ip_icmp.h> - 这是头文件存在于您的系统上?