[Winpcap-users] error C2065: 'PCAP_SRC_IF_STRING' :
gianluca.varenni at cacetech.com
Sat Jan 14 04:19:03 GMT 2006
you probably forgot to add WPCAP and HAVE_REMOTE in the preprocessor
definitions for your project.
I think you are using managed C++ (the call to MessageBox::Show is to a
managed type), in order not to have linking or runtime problems, I suggest
you to read this message from the winpcap-users mailing list
Have a nice day
----- Original Message -----
From: "Craig Bumpstead" <cbumpste at yahoo.com.au>
To: <winpcap-users at winpcap.org>
Sent: Friday, January 13, 2006 7:06 PM
Subject: [Winpcap-users] error C2065: 'PCAP_SRC_IF_STRING' :
I have the following error:
error C2065: 'PCAP_SRC_IF_STRING' : undeclared
Thank you to Gianluca Varenni for his suggestion, but
I think I should stay with VC++ 2003 as most seem to
use it rather than 2005.
The code is the sample from the doc's, just modified
I have put the relevant paths to the includes and lib
directories in VC++ and included pcap.h in form1.h.
What am I missing?
I have put the following code in the form_load area.
/* Retrieve the device list from the local machine
if (pcap_findalldevs_ex(PCAP_SRC_IF_STRING, NULL
/* auth is not needed */, &alldevs, errbuf) == -1)
MessageBox::Show(S"Error in pcap_findalldevs_ex");
pcap_findalldevs_ex: %s\n", errbuf);
/* Print the list */
for(d= alldevs; d != NULL; d= d->next)
//printf("%d. %s", ++i, d->name);
myString = d->description;
/*printf(" (%s)\n", d->description);*/
/*printf(" (No description
if (i == 0)
MessageBox::Show(S"No interfaces found! Make sure
WinPcap is installed.",S"Error");
//printf("\nNo interfaces found! Make sure
WinPcap is installed.\n");
/* We don't need any more the device list. Free it
Do you Yahoo!?
Listen to over 20 online radio stations and watch the latest music videos on
Winpcap-users mailing list
Winpcap-users at winpcap.org
More information about the Winpcap-users