I’m working on Fedora 17 and I want to program with libpcap. The problem is that my computer isn’t finding pcap.h, which is really wierd since I’ve installed libpcap and libpcap-devel. Also wireshark and snort works on my station which I believe uses that library. So when I compile my code with …
#include <pcap.h>
... Code
And use gcc my_file.c -lpcap, I get compiler errors that say … can’t find pcap.h. Whats odd is that I see my libpcap.so files in /libraries/ directory. I’ve done ..
yum install libpcap
and
yum install libpcap-devel
I don’t know why Fedora is doing this to me.
Thanks for any help!
You’ll have to specify the folder where the headers are installed, for example:
Try
locate pcap.hto find the right directory to use with the-Iswitch.