[Winpcap-users] "unresolved external symbol"
samuelvoiron at gmail.com
Tue Mar 13 09:06:46 GMT 2007
Hello, thank you for your help !!... but :
2007/3/13, Gianluca Varenni <gianluca.varenni at cacetech.com>:
> ----- Original Message -----
> From: "Samuel Voiron" <samuelvoiron at gmail.com>
> > Hello,
> > I'm trying to use the Winpcap library to develop a sniffer
> > application. I am at the step of getting familiar with the basic
> > functions of the API.
> > I got successful running the few first examples given in the tutorial
> > on LINUX (actually using libcap so, out of topic, sorry) but I am
> > really struggling to have it work on WINDOWS.
> > I red pretty much all I found about my problem and still can't find a
> > way to sort it out.
> > I'm using VisualC++2005Express and try to run this example :
> > http://www.winpcap.org/docs/docs_40/html/group__wpcap__tut1.html>
> > It compiles but I have this errors at the execution :
> > main.obj : error LNK2019: unresolved external symbol _pcap_freealldevs
> > referenced in the function _main
> > main.obj : error LNK2019: unresolved external symbol
> > _pcap_findalldevs_ex referenced in the function _main
> You need to add wpcap.lib in the additional lib dependencies of your
> (it's one of the linker properties). wpcap.lib is available in the lib
> folder of the developer's pack.
I have of course already done that ... as soon as I read about it on this
Here's exactly what I did :
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.
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
Done !! At least that's what I thought...
> > I have seen that several people from the mailing list had similar
> > problems and they seem to have been able to solve it by including lib,
> > dll, etc.. files. I included all I could, even downloading wpcap.dll,
> > which was not included in the winpcap development kit and putting it
> > in the Wpcap directory, trying with a coppy in c:/windows/system32,
> wpcap.dll is installed by the WinPcap installer. You always need to
> WinPcap, the devpack doesn't include it.
Actually, I found the dll's (packet.dll and wpcap.dll) on my hard
drive.Ithink they come from the installation of wireshark, which
> > I read about including WPCAP and HAVE_REMOTE in the preprocessor
> > definitions and did it.
> > The error mentioned above still comes up.
> > I thought about actually compiling the entire winpcap driver but found
> You do not need to compile the driver to develop a WinPcap based
> application. You need
> - WinPcap installed on your machine
> - the developer's pack
> - either Microsoft Visual Studio or cygwin
That's what I thought =)
Hope it helps
Not quite yet ... but many thanks !! =)
> that I should use a windows driver development kit, which is a 2.4GB
> > iso to download... (sic)
> > I don't think I have to do this and should be able to get my programs
> > work with just the winpcap API.
> > I may have omitted one very simple trick... in that case, I'm sorry
> > about it but please, help me out.
> > Thanks a lot,
> > Samuel
> > _______________________________________________
> > Winpcap-users mailing list
> > Winpcap-users at winpcap.org
> > https://www.winpcap.org/mailman/listinfo/winpcap-users
> Winpcap-users mailing list
> Winpcap-users at winpcap.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Winpcap-users