[Winpcap-users] Using WinPcap with Visual C++ version 6.
Tom Chapman
tchapman131 at gmail.com
Wed Oct 13 08:41:07 PDT 2010
I have an existing MFC project that uses Visual C++ Version 6. I want to add
WinPcap to this project. In one of my .cpp files, I added #include "pcap.h".
When this file is compiled I receive a bunch of compiler errors. Apparently
WinPcap includes winsock2.h and this conflicts with winsock.h that the
compiler is already using. I can't find how to make this work. In older
posts on the web, I have found various "ideas" people have posted as
possible solutions. Many of these posts are not my exact situation. None of
these have worked for me.
*How can I get the compiler to work with WinPcap?*
FYI: I have installed the platform SDK Aug 2004 edition. Do I need to
register this somehow within Visual C++? How? Where in the menus?
Thank you for helping me.
Below are the first few errors that I receive:
c:\program files\microsoft visual studio\vc98\include\winsock2.h(99) : error
C2011: 'fd_set' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(134) :
warning C4005: 'FD_SET' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\winsock.h(83)
: see previous definition of 'FD_SET'
c:\program files\microsoft visual studio\vc98\include\winsock2.h(143) :
error C2011: 'timeval' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(199) :
error C2011: 'hostent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(212) :
error C2011: 'netent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(219) :
error C2011: 'servent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(226) :
error C2011: 'protoent' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(310) :
error C2011: 'in_addr' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(368) :
error C2011: 'sockaddr_in' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(378) :
error C2011: 'WSAData' : 'struct' type redefinition
c:\program files\microsoft visual studio\vc98\include\winsock2.h(430) :
warning C4005: 'SO_DONTLINGER' : macro redefinition
c:\program files\microsoft visual studio\vc98\include\winsock.h(391)
: see previous definition of 'SO_DONTLINGER'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20101013/50945dd3/attachment.htm
More information about the Winpcap-users
mailing list