I'm trying to compile a simple C program which relies on the libpcap library, except everytime I try to compile it i get the error:
ld: Undefined symbols:
_pcap_lookupdev
Here is the C code:
It sounds like the linker is having trouble locating the *pcap_lookupdev(char *) function, however it is clearly present in the pcap.h header file. libcap is also properly installed (I'm pretty sure anyway).
Does anyone have any advice?
ld: Undefined symbols:
_pcap_lookupdev
Here is the C code:
Code:
#include [pcap.h]
#include [stdio.h]
int main()
{
char *dev, errbuf[PCAP_ERRBUF_SIZE];
dev = pcap_lookupdev(errbuf);
printf("Device %s\n", dev);
return(0);
}
It sounds like the linker is having trouble locating the *pcap_lookupdev(char *) function, however it is clearly present in the pcap.h header file. libcap is also properly installed (I'm pretty sure anyway).
Does anyone have any advice?