The _ w64 error occurs during wincap4.11 compilation under vc6.

Source: Internet
Author: User
Others' questions and answers:

The following error occurs when compiling Winpcap 4.1.1 In vc6 because vc6.0 does not fully support the C ++ 99 standard and may cause compilation problems in 64-bit CPU, switch Winpcap to version 4.0.1 and the following errors disappear

C: \ wpdpack \ include \ pcap-stdinc.h (79): Error c2144: syntax error: Missing '; 'before type' unsigned int'
C: \ wpdpack \ include \ pcap-stdinc.h (79): Fatal error c1004: unexpected end of file found

You can also use the method of upgrading vc6.0 psdk.

Solution:

Leo solution:

However, I am not bothered by either of the two methods (this is a variety of errors caused by various software versions such as Vs and so on ....)

Since the psdk version of vc6 is low, w64 is not supported. That's good! I used vs2008, so we can always follow up on the wincap of the later version. The result is correct.

Or press the original Handler --> put the folder wpdpack into the project directory, Set setting (include and Lib) in the option, right-click the project and choose Properties> Preprocessor with wpcap; have_remote, and-> linker-> input with wpcap. lib is configured.

The following is a simple example of Leo compilation. You can try it:

// Wincaptest2008.cpp: defines the entry point for the console application.
//
# Include "stdafx. H"
# Include "pcap. H" // Leo begins to define this sentence before # include "sdafx. H". The result is 22 errors, and the compilation is successful after the change.

Int _ tmain (INT argc, _ tchar * argv [])
{
Pcap_if_t * alldevs;

Pcap_if_t * D;

Int I = 0;

Char errbuf [pcap_errbuf_size];

If (pcap_findalldevs (& alldevs, errbuf) =-1)

{

Fprintf (stderr, "error in pcap_findalldevs_ex: % s \ n", errbuf );

Exit (1 );

}

For (D = alldevs; D! = NULL; D = D-> next)

{

Printf ("% d. % s", ++ I, d-> name );

If (D-> description)

Printf ("(% s) \ n", D-> description );

Else

Printf ("(no description available) \ n ");

}

If (I = 0)

{

Printf ("\ Nno interfaces found! Make sure Winpcap is installed. \ n ");

Return-1;

}

Pcap_freealldevs (alldevs );

Return 0;
}

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.