Hello, thank you for your help !!... but :<br><br><div><span class="gmail_quote">2007/3/13, Gianluca Varenni <<a href="mailto:gianluca.varenni@cacetech.com">gianluca.varenni@cacetech.com</a>>:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>----- Original Message -----<br>From: "Samuel Voiron" <<a href="mailto:samuelvoiron@gmail.com">samuelvoiron@gmail.com</a>><br><br>> Hello,<br>><br>> I'm trying to use the Winpcap library to develop a sniffer
<br>> application. I am at the step of getting familiar with the basic<br>> functions of the API.<br>> I got successful running the few first examples given in the tutorial<br>> on LINUX (actually using libcap so, out of topic, sorry) but I am
<br>> really struggling to have it work on WINDOWS.<br>> I red pretty much all I found about my problem and still can't find a<br>> way to sort it out.<br>><br>> I'm using VisualC++2005Express and try to run this example :
<br>> <a href="http://www.winpcap.org/docs/docs_40/html/group__wpcap__tut1.html">http://www.winpcap.org/docs/docs_40/html/group__wpcap__tut1.html</a>><br>> It compiles but I have this errors at the execution :<br>
><br>> main.obj : error LNK2019: unresolved external symbol _pcap_freealldevs<br>> referenced in the function _main<br>> main.obj : error LNK2019: unresolved external symbol<br>> _pcap_findalldevs_ex referenced in the function _main
<br><br>You need to add wpcap.lib in the additional lib dependencies of your project<br>(it's one of the linker properties). wpcap.lib is available in the lib<br>folder of the developer's pack.</blockquote><div><br>
I have of course already done that ... as soon as I read about it on this mailing list.<br>Here's exactly what I did :<br>In the Tools/Option menu, on the left, I chosse "Projects and Solutions" (sorry my Visual is in french so I merely translate) and "VC++ Directories". In the "Display Directories for" menu on the upper-right, I choose "Include Files" and add a new line by selecting the Include directory of the WinPcap Pack directory. I then do the same for "Librairy files" in the upper-right menu, selecting the WinPcap/Lib directory and adding it in a new line.
<br><br>All this is a configuration that will affect all the projects I'll work on with VC++. I also change just one thing in the "Project/Properties" menu about the preprocessing values. On the the left of this box, I go in "Configuration Properties -> C/C++ -> Preprocessor" and on the right, in "Preprocessor Definition", where there already is "WIN32;_DEBUG;_CONSOLE" I add ";WPCAP;HAVE_REMOTE".
<br><br>Done !! At least that's what I thought...<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">><br>> I have seen that several people from the mailing list had similar
<br>> problems and they seem to have been able to solve it by including lib,<br>> dll, etc.. files. I included all I could, even downloading wpcap.dll,<br>> which was not included in the winpcap development kit and putting it
<br>> in the Wpcap directory, trying with a coppy in c:/windows/system32,<br><br>wpcap.dll is installed by the WinPcap installer. You always need to install<br>WinPcap, the devpack doesn't include it.</blockquote><div>
<br>Actually, I found the dll's (packet.dll and wpcap.dll) on my hard drive.I think they come from the installation of wireshark, which includes these.<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
> ...<br>><br>> I read about including WPCAP and HAVE_REMOTE in the preprocessor<br>> definitions and did it.<br>><br>> The error mentioned above still comes up.<br>><br>> I thought about actually compiling the entire winpcap driver but found
<br><br>You do not need to compile the driver to develop a WinPcap based<br>application. You need<br><br>- WinPcap installed on your machine<br>- the developer's pack<br>- either Microsoft Visual Studio or cygwin</blockquote>
<div><br>That's what I thought =) <br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hope it helps<br>GV</blockquote><div><br>
Not quite yet ... but many thanks !! =)<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">> that I should use a windows driver development kit, which is a
2.4GB<br>> iso to download... (sic)<br>> I don't think I have to do this and should be able to get my programs<br>> work with just the winpcap API.<br>><br>> I may have omitted one very simple trick... in that case, I'm sorry
<br>> about it but please, help me out.<br>><br>> Thanks a lot,<br>> Samuel<br>> _______________________________________________<br>> Winpcap-users mailing list<br>> <a href="mailto:Winpcap-users@winpcap.org">
Winpcap-users@winpcap.org</a><br>> <a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br><br>_______________________________________________<br>Winpcap-users mailing list
<br><a href="mailto:Winpcap-users@winpcap.org">Winpcap-users@winpcap.org</a><br><a href="https://www.winpcap.org/mailman/listinfo/winpcap-users">https://www.winpcap.org/mailman/listinfo/winpcap-users</a><br></blockquote></div>