[Winpcap-users] LNK2019: Unresolved external symbol _pcap_close

Gianluca Varenni gianluca.varenni at cacetech.com
Mon Sep 10 09:31:43 GMT 2007


Just a detail on this: adding wpcap.lib in the linker options for VC++ is 
*not* a workaround. This is how you link a WinPcap-based application. And 
this is how you link whatever application compiled with VC++ with an 
external DLL (if you use DLLs and early binding): you must include the .lib 
corresponding to your DLL in the linker options of your project. The .lib 
file must be provided by whomever gives you the DLL itself.

Just my two cents
GV



----- Original Message ----- 
From: "Kevin Miles" <kevin.miles at delgaldo.co.uk>
To: <winpcap-users at winpcap.org>
Sent: Friday, September 07, 2007 6:20 AM
Subject: RE: [Winpcap-users] LNK2019: Unresolved external symbol _pcap_close


> MSVC++ is mangling the name and adding a leading underscore. The 
> workaround
> is to link in the library wpcap.lib which seems to map the underscored 
> names
> to the 'real' ones. (Thanks to Bryan Kadzban who told me this.)
>
> Kevin.
>
> On 07 September 2007 12:55 winpcap-users-bounces at winpcap.org <> wrote:
>
>> Hi,
>>
>>
>>
>> I using VS2006 to compile the "capture" example.
>>
>> I am getting: LNK2019: Unresolved external symbol
>> _pcap_close
>>
>>
>>
>> I have worked through the section "Using WinPcap in
>> your programs".
>>
>>
>>
>> Any ideas?
>>
>>
>>
>> Cheers,
>>
>> Craig
>>
>>
>>
>>
>>
>>
>> __________________________________________________________________
>> __________________ Sick of deleting your inbox? Yahoo!7 Mail has free
>> unlimited storage. http://au.docs.yahoo.com/mail/unlimitedstorage.html
>>
>> _______________________________________________
>> 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
> https://www.winpcap.org/mailman/listinfo/winpcap-users 



More information about the Winpcap-users mailing list