Dear all,<br><br>I am new to WinPcap, I had followed the instructions showed at <a href="http://www.winpcap.org/docs/docs_411/html/group__wpcapsamps.html">http://www.winpcap.org/docs/docs_411/html/group__wpcapsamps.html</a> . When I try to compile the codes I get from <a href="http://www.winpcap.org/docs/docs_411/html/group__wpcap__tut3.html">http://www.winpcap.org/docs/docs_411/html/group__wpcap__tut3.html</a> , by using Visual C++ 2008 Express Edition on Windows 7 Home Premium 64-bit edition, I get the following errors:<br>
<br>1>------ Build started: Project: network, Configuration: Debug Win32 ------<br>1>Compiling...<br>1>network.cpp<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(68) : error C2146: syntax error : missing ';' before identifier 'bpf_u_int32'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(68) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(68) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(105) : error C2146: syntax error : missing ';' before identifier 'bv_major'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(105) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(106) : error C2146: syntax error : missing ';' before identifier 'bv_minor'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(106) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(106) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(905) : error C2146: syntax error : missing ';' before identifier 'code'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(905) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(905) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(906) : error C2146: syntax error : missing ';' before identifier 'jt'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(906) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(906) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(907) : error C2146: syntax error : missing ';' before identifier 'jf'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(907) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(907) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(908) : error C2146: syntax error : missing ';' before identifier 'k'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(908) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(908) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(919) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\bpf.h(919) : error C2143: syntax error : missing ',' before '*'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(130) : error C2146: syntax error : missing ';' before identifier 'magic'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(130) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(130) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(131) : error C2146: syntax error : missing ';' before identifier 'version_major'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(131) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(131) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(132) : error C2146: syntax error : missing ';' before identifier 'version_minor'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(132) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(132) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(134) : error C2146: syntax error : missing ';' before identifier 'sigfigs'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(134) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(134) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(135) : error C2146: syntax error : missing ';' before identifier 'snaplen'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(135) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(135) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(136) : error C2146: syntax error : missing ';' before identifier 'linktype'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(136) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(136) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(168) : error C2079: 'pcap_pkthdr::ts' uses undefined struct 'timeval'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(169) : error C2146: syntax error : missing ';' before identifier 'caplen'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(169) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(170) : error C2146: syntax error : missing ';' before identifier 'len'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(170) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(228) : error C2146: syntax error : missing ';' before identifier 'flags'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(228) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(228) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(244) : error C2065: 'u_char' : undeclared identifier<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(244) : error C2059: syntax error : ','<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(272) : error C2061: syntax error : identifier 'bpf_u_int32'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(299) : error C2061: syntax error : identifier 'pcap_handler'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(300) : error C2061: syntax error : identifier 'pcap_handler'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(301) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(301) : error C2143: syntax error : missing ';' before '*'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(302) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(303) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(303) : error C2143: syntax error : missing ',' before '*'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(311) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(311) : error C2143: syntax error : missing ',' before '*'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(317) : error C2061: syntax error : identifier 'bpf_u_int32'<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(319) : error C2061: syntax error : identifier 'bpf_u_int32'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(322) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(322) : error C2143: syntax error : missing ',' before '*'<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(346) : error C2059: syntax error : ','<br>1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(354) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int<br>
1>c:\files\wpdpack_4_1_1\wpdpack\include\pcap\pcap.h(354) : error C2143: syntax error : missing ',' before '*'<br>1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(4) : error C2065: 'param' : undeclared identifier<br>
1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(4) : error C2059: syntax error : 'const'<br>1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(19) : error C3861: 'exit': identifier not found<br>
1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(74) : error C2065: 'packet_handler' : undeclared identifier<br>1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(81) : error C2065: 'param' : undeclared identifier<br>
1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(81) : error C2059: syntax error : 'const'<br>1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(82) : error C2143: syntax error : missing ';' before '{'<br>
1>c:\users\user\documents\visual studio 2008\projects\network\network\network.cpp(82) : error C2447: '{' : missing function header (old-style formal list?)<br>1>Build log was saved at "file://c:\Users\user\Documents\Visual Studio 2008\Projects\network\network\Debug\BuildLog.htm"<br>
1>network - 78 error(s), 0 warning(s)<br>========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========<br><br>How to solve it?<br>