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

来源:互联网 发布:python for none 编辑:程序博客网 时间:2024/05/19 15:41
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 liste:\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 liste:\vehiclesecurity\wpdpack_4_1_2\include\pcap\bpf.h(67) : error C2085: 'bpf_int32' : not in formal parameter liste:\vehiclesecurity\wpdpack_4_1_2\include\pcap\bpf.h(68) : error C2085: 'bpf_u_int32' : not in formal parameter liste:\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 illegale:\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 illegale:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(317) : error C2081: 'bpf_u_int32' : name in formal parameter list illegale:\vehiclesecurity\wpdpack_4_1_2\include\pcap\pcap.h(319) : error C2081: 'bpf_u_int32' : name in formal parameter list illegale:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(57) : error C2065: 'bpf_u_int32' : undeclared identifiere:\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 identifiere:\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 identifiere:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : error C2065: 'header' : undeclared identifiere:\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 2e:\vehiclesecurity\wpdpack_4_1_2\examples-pcap\pcap_filter\pcap_filter.c(154) : error C2065: 'pkt_data' : undeclared identifiere:\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 3e:\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 2e:\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 3Error executing cl.exe.pf.exe - 41 error(s), 8 warning(s)

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

#define _WIN64


2 0