[Winpcap-users] Error Compilation Tutorial Gathering Statisticson the network traffic

Chris Barlas chris_barlas at wintec-inc.com
Tue Apr 25 13:28:27 GMT 2006


<snip>

#define HAVE_REMOTE /*must be defined before include of pcap.h*/

#include <pcap.h>

</snip>

 

Did you #define HAVE_REMOTE?  I couldn't get anything to compile on visual
studio 6 without using this #define. Even though I'm not doing anything with
remote hosts.. but this got me past the errors (which were similar to
yours.)

 

::chris

 

  _____  

From: winpcap-users-bounces at winpcap.org
[mailto:winpcap-users-bounces at winpcap.org] On Behalf Of Eric Hansen
Sent: Tuesday, April 25, 2006 8:02 AM
To: winpcap-users at winpcap.org
Subject: Re: [Winpcap-users] Error Compilation Tutorial Gathering
Statisticson the network traffic

 

Either you aren't linking the required libraries, or you aren't including
the correct headers.

On 4/25/06, Cirix MAN <cirixman at hotmail.com> wrote: 

Hello with all developers,

I am currently trying to produce tools in C++ allowing to post the flow of a

connection UDP on an interface. I used one of the tutorials of the WinPcap
library in order to create a filter allowing to print in the screen only UDP
packet on a port specified by the user. Unfortunately, I have some problems 
to compile the tutorial statistical WinpCap. Indeed, with Microsft Visual
C++ Studio, I obtain the following errors :

c:\documents and settings\administrateur\mes
documents\wpdpack\examples-pcap\ttt\cpp2.cpp(30) : error C2065: 'pcap_open' 
: undeclared identifier
c:\documents and settings\administrateur\mes
documents\wpdpack\examples-pcap\ttt\cpp2.cpp(30) : error C2065:
'PCAP_OPENFLAG_PROMISCUOUS' : undeclared identifier
c:\documents and settings\administrateur\mes 
documents\wpdpack\examples-pcap\ttt\cpp2.cpp(30) : error C2440: '=' : cannot
convert from 'int' to 'struct pcap *'
       Conversion from integral type to pointer type requires
reinterpret_cast, C-style cast or function-style cast 

I use this same source code :

http://www.winpcap.org/docs/docs31/html/group__wpcap__tut9.html

Have already succeeds in itself compiling this code? 

Thank you in advance, With kind regards

_________________________________________________________________
Retrouvez tout en un clin d'oeil avec la barre d'outil MSN Search !
http://desktop.msn.fr/

_______________________________________________
Winpcap-users mailing list
Winpcap-users at winpcap.org
https://www.winpcap.org/mailman/listinfo/winpcap-users




-- 
Mess with the best, die like the rest 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.winpcap.org/pipermail/winpcap-users/attachments/20060425/0653b56d/attachment.htm


More information about the Winpcap-users mailing list