OpenWrt Forum Archive

Topic: uclibc and libpcap

The content of this topic has been archived on 31 Mar 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

I want to coding program that use libpcap library and run on wrt54g(mipsel architecture).
But when I cross compile source code using mipsel-linux-gcc or mipsel-linux-uclibc-gcc, it generate error follow this.

pcap_send.c:22:18: pcap.h: No such file or directory
pcap_send.c: In function `main':
pcap_send.c:230: error: `pcap_t' undeclared (first use in this function)
pcap_send.c:230: error: (Each undeclared identifier is reported only once
pcap_send.c:230: error: for each function it appears in.)
pcap_send.c:230: error: `handle' undeclared (first use in this function)
pcap_send.c:232: error: `PCAP_ERRBUF_SIZE' undeclared (first use in this function)

I think it cause uclibc don't have libpcap library. But I don't know how to add libpcap library.
someone help me fix this problem please.

Thank you.

I would simply use the SDK (libpcap headers are included in the SDK) and create a package. That's the easiest way...

Thank you forum2006 for reply. But I don't where is SDK.
Could you tell me plz?

The discussion might have continued from here.