[Winpcap-users] "unresolved external symbol"

Samuel Voiron samuelvoiron at gmail.com
Fri Mar 9 12:42:11 GMT 2007


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

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,
...

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
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


More information about the Winpcap-users mailing list