winpcap示例程序采用VC6编译时出错error C2054: expected '(' to follow '_W64'

e:\vehiclesecurity\wpdpack_4_1_2\include\pcap-stdinc.h(80) : error C2054: expected '(' to follow '_W64'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap-stdinc.h(80) : error C2085: 'uintptr_t' : not in formal parameter list
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap-stdinc.h(89) : error C2628: '_W64' followed by 'int' is illegal (did you forget a ';'?)
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap-stdinc.h(89) : error C2085: 'intptr_t' : not in formal parameter list
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\bpf.h(67) : error C2085: 'bpf_int32' : not in formal parameter list
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\bpf.h(68) : error C2085: 'bpf_u_int32' : not in formal parameter list
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\bpf.h(908) : error C2061: syntax error : identifier 'bpf_u_int32'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\bpf.h(909) : error C2059: syntax error : '}'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(130) : error C2061: syntax error : identifier 'bpf_u_int32'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(133) : error C2061: syntax error : identifier 'thiszone'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(133) : error C2059: syntax error : ';'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(134) : error C2061: syntax error : identifier 'sigfigs'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(134) : error C2059: syntax error : ';'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(135) : error C2061: syntax error : identifier 'snaplen'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(135) : error C2059: syntax error : ';'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(136) : error C2061: syntax error : identifier 'linktype'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(136) : error C2059: syntax error : ';'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(137) : error C2059: syntax error : '}'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(169) : error C2061: syntax error : identifier 'bpf_u_int32'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(170) : error C2061: syntax error : identifier 'len'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(170) : error C2059: syntax error : ';'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(171) : error C2059: syntax error : '}'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(228) : error C2061: syntax error : identifier 'bpf_u_int32'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(229) : error C2059: syntax error : '}'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(272) : error C2143: syntax error : missing ')' before '*'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(272) : error C2081: 'bpf_u_int32' : name in formal parameter list illegal
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(272) : error C2143: syntax error : missing '{' before '*'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(272) : error C2059: syntax error : ','
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(272) : error C2059: syntax error : ')'
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(287) : error C2122: 'char *' : prototype parameter in name list illegal
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(317) : error C2081: 'bpf_u_int32' : name in formal parameter list illegal
e:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(319) : error C2081: 'bpf_u_int32' : name in formal parameter list illegal
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(57) : error C2065: 'bpf_u_int32' : undeclared identifier
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(57) : error C2146: syntax error : missing ';' before identifier 'NetMask'
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(57) : error C2065: 'NetMask' : undeclared identifier
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(58) : error C2143: syntax error : missing ';' before 'type'
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(59) : error C2143: syntax error : missing ';' before 'type'
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(60) : error C2143: syntax error : missing ';' before 'const'
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : error C2065: 'res' : undeclared identifier
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : error C2065: 'header' : undeclared identifier
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : warning C4047: 'function' : 'struct pcap_pkthdr ** ' differs in levels of indirection from 'int *'
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : warning C4024: 'pcap_next_ex' : different types for formal and actual parameter 2
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : error C2065: 'pkt_data' : undeclared identifier
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : warning C4047: 'function' : 'const unsigned char ** ' differs in levels of indirection from 'int *'
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : warning C4024: 'pcap_next_ex' : different types for formal and actual parameter 3
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(162) : warning C4047: 'function' : 'const struct pcap_pkthdr *' differs in levels of indirection from 'int '
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(162) : warning C4024: 'pcap_dump' : different types for formal and actual parameter 2
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(162) : warning C4047: 'function' : 'const unsigned char *' differs in levels of indirection from 'int '
e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(162) : warning C4024: 'pcap_dump' : different types for formal and actual parameter 3
Error executing cl.exe.


pf.exe - 41 error(s), 8 warning(s)

在pcap-stdinc.h文件最前面加上一句:

#define _WIN64


  • 3
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值