I'm trying to install Libpcap. But I cannot compile a test program to test it.

I got the test program (ldev.c) from the yuba stanford website.

I just want to test Libpcap. If you have another suggestion on testing it, please let me know.

Here is the error that I get when I try to compile ldev.c

Code:
ldev.c:(.text+0x2a): undefined reference to `pcap_lookupdev'
ldev.c:(.text+0x86): undefined reference to `pcap_lookupnet'
How do I define these references?