Dec
11
2011

Winpcap compile error in pcap-stdinc.h in vc++ 6.0

When compiling winpcap in your program on Visual C++ 6.0 you might get an error like this :

Compiling...
main.cpp
c:\codes\include\pcap-stdinc.h(79) : error C2144: syntax error : missing ';' before type 'unsigned int'
c:\codes\include\pcap-stdinc.h(79) : fatal error C1004: unexpected end of file found
Error executing cl.exe.

And it will point to the following lines in pcap-stdinc.h

typedef _W64 unsigned int   uintptr_t;
typedef _W64 int   intptr_t;

Simple edit them as :

typedef unsigned int   uintptr_t; //typedef _W64 unsigned int   uintptr_t;
typedef int   intptr_t; //typedef _W64 int   intptr_t;

Now it should compile fine.

Popularity: 1% [?]

Leave a comment