Home » Errors & Failures » How to resolve : undefined reference to `pcap_lookupdev’

How to resolve : undefined reference to `pcap_lookupdev’

If you are trying to compile any network packet capturing related program, there are higher chances you may see an errors like,

This error is because, you either doesn’t have libpcap installed or its not being linked from the command line. Lets say you are trying to compile simple wifi packet sinffer based on libpcap, then first you will need to install libpcap.

This will install your machine dependent libpcap version. and then link the libpcap during compilation as,


Subscribe our Rurban Life YouTube Channel.. "Rural Life, Urban LifeStyle"

2 thoughts on “How to resolve : undefined reference to `pcap_lookupdev’”

    • Hi, Thanks for pointing this. Corrected it now. Please do subscribe to this website from bottom right subscription, Thanks.

      Reply

Leave a Comment