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.<br>
<br><u><b>How can I get the compiler to work with WinPcap?</b></u><br><br>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?<br><br><br>
Thank you for helping me.<br><br><br>Below are the first few errors that I receive:<br><br>c:\program files\microsoft visual studio\vc98\include\winsock2.h(99) : error C2011: 'fd_set' : 'struct' type redefinition<br>
c:\program files\microsoft visual studio\vc98\include\winsock2.h(134) : warning C4005: 'FD_SET' : macro redefinition<br> c:\program files\microsoft visual studio\vc98\include\winsock.h(83) : see previous definition of 'FD_SET'<br>
c:\program files\microsoft visual studio\vc98\include\winsock2.h(143) : error C2011: 'timeval' : 'struct' type redefinition<br>c:\program files\microsoft visual studio\vc98\include\winsock2.h(199) : error C2011: 'hostent' : 'struct' type redefinition<br>
c:\program files\microsoft visual studio\vc98\include\winsock2.h(212) : error C2011: 'netent' : 'struct' type redefinition<br>c:\program files\microsoft visual studio\vc98\include\winsock2.h(219) : error C2011: 'servent' : 'struct' type redefinition<br>
c:\program files\microsoft visual studio\vc98\include\winsock2.h(226) : error C2011: 'protoent' : 'struct' type redefinition<br>c:\program files\microsoft visual studio\vc98\include\winsock2.h(310) : error C2011: 'in_addr' : 'struct' type redefinition<br>
c:\program files\microsoft visual studio\vc98\include\winsock2.h(368) : error C2011: 'sockaddr_in' : 'struct' type redefinition<br>c:\program files\microsoft visual studio\vc98\include\winsock2.h(378) : error C2011: 'WSAData' : 'struct' type redefinition<br>
c:\program files\microsoft visual studio\vc98\include\winsock2.h(430) : warning C4005: 'SO_DONTLINGER' : macro redefinition<br> c:\program files\microsoft visual studio\vc98\include\winsock.h(391) : see previous definition of 'SO_DONTLINGER'<br>
<br>