WinPcap installation, cannot open include file ' Pcap.h '

Source: Internet
Author: User

VC Error fatal error C1083:cannot open include file: ' Pcap.h ': No such file or directory

Winpcap is a professional Winpcap under the Windows platform is a powerful network development library, which can implement many functions: Obtain the available network adapter, get the specified adapter information (such as name and description information), capture the data packet of the specified network card ; Send data packets, filter the captured packets to obtain a specific package, and so on.

The winpcap consists of two parts:
1. Drivers: Extended operating system features provide low-level network access
2. Dynamic link Library: Applications running on the Win32 platform can easily access low-level data on the network.

WinPcap How to use the installation


1. Download the installation package, development package

http://www.winpcap.org/install/default.htm Download the WinPcap installation package,
http://www.winpcap.org/devel.htm Download the WinPcap Development Kit (WinPcap SDK).

2. Execute the installation package so that your machine can run the WINPCAP program.

3. Unpack the development package, after extracting some documents, example and demo, to use is include and Lib folder;
The Include Fils and library files of tools-->option-->directories in VC6.0 are added to WinPcap's include and Lib directories.

4. On the Link tab, add wpcap.lib ws2_32.lib Packet.lib

5. Add Wpcap,have_remote in a predefined macro or include it directly in the Pcap.h file

#define Wpcap

#define Have_remote

6. Start writing the WPCAP program.

————————————————————————————————————————————

ReBuild All:

The error is as follows:

Error C2144:syntax error:missing '; ' before type ' unsigned int '

Locate this line in _W64

_w64 _w64  

The reason is that vc6.0 does not perfectly support the C++99 standard (VC6 PSDK version is low, does not support W64), compiling in 64-bit CPUs will be problematic, shifting winpcap development to 4.0.1 version or other previous version and the following error disappears

Of course you can also use VS2005, VS2008, VS2010, etc., can follow up the high version of the Wincap.

Previous attempts to "get rid of _w64" or "# define _W64 in Pcap.h" did not solve the problem.

--------------------------------------------------------------------------------------------------------------- ---------------

The WinPcap development environment needs to be a Windows operating system, and the WinPcap driver must be installed to debug your program.

WinPcap installation, cannot open include file ' Pcap.h '

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.