RE: [WinPcap-users] Re: Windows / Visual C: unresolved external symbol pcap_open
-Original Message- From: Massimo Sala [mailto:[EMAIL PROTECTED] Sent: mercoledì 29 dicembre 2004 10.56 To: winpcap-users@winpcap.polito.it Subject: [WinPcap-users] Re: Windows / Visual C: unresolved external symbol pcap_open From: Vasily Borovyak [EMAIL PROTECTED] You forgot to link wpcap.lib probably. In VC6 Press Alt+F7. Choose Link tab. Add wpcap.lib to the Object/library modules edit box. Vasily, thanks for your answer. I check the reference, it is fine. It is a weird behaviour. The deprecated functions work fine (line pcap_open_live, pcap_findalldevs, ...). When I try to use the new wpcap functions, like pcap_open, pcap_findalldevs_ex, ... I still get unresolved externals symbol. To be sure, I download again the latest wpcapsrc_3_1_beta4.zip and wpdpack_3_1_beta4.zip. I note this: some of the new APIs are inside the file pcap-new.c. This file hasn't an header and the APIs aren't listed inside pcap.h ... yes, this is true. It is because of the need to minimize differences between libpcap and WinPcap. In order to use the new functions, you must define the HAVE_REMOTE constant in your program. This choice has been made after several discussions within the WinPcap team, because earlier version of WinPcap defined this constant automatically. However there were some issue related to libpcap compatibility, therefore we decided to switch this on manually. fulvio = This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/ To unsubscribe use mailto: [EMAIL PROTECTED] =
Re: [WinPcap-users] Re: Windows / Visual C: unresolved external symbol pcap_open
From: Loris Degioanni [EMAIL PROTECTED] Massimo, did you compile the right version of winpcap? If you go to build-set active configuration, you find several projects. You are probably compiling the one without the new funtions. Loris I am not compiling winpcap, only my little project using pcap.h. Fulvio Risso got the problem, see my next email. Grazie, Massimo == This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/ To unsubscribe use mailto: [EMAIL PROTECTED] ==
Re: [WinPcap-users] Re: Windows / Visual C: unresolved external symbol pcap_open
From: Massimo Sala [mailto:[EMAIL PROTECTED] When I try to use the new wpcap functions, like pcap_open, pcap_findalldevs_ex, ... I still get unresolved externals symbol. To be sure, I download again the latest wpcapsrc_3_1_beta4.zip and wpdpack_3_1_beta4.zip. From: Fulvio Risso [EMAIL PROTECTED] yes, this is true. It is because of the need to minimize differences between libpcap and WinPcap. In order to use the new functions, you must define the HAVE_REMOTE constant in your program. Many thanks Fulvio, this is the solution. I put the #define HAVE_REMOTE just before #include pcap.h and the linker resolves also the new API. Furthemore I can delete the weird include #include remote-ext.h I had to use... Perhaps I am a donkey, but I didn't read about HAVE_REMOTE in the documentation. If it is missing, can you add your answer to the documentation ? I feel it is important to keep track of this change. Grazie, Massimo == This is the WinPcap users list. It is archived at http://www.mail-archive.com/winpcap-users@winpcap.polito.it/ To unsubscribe use mailto: [EMAIL PROTECTED] ==