• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

Apps error: compile libpcap on android with ndk

wxbhcs

Lurker
May 13, 2010
1
0
When I compile the libpcap code with ndk, I came up with errors.

/home/wxb/netFlux/bin/ndk/local/armeabi/libpcap.a(gencode.o): In function `pcap_compile':
/home/wxb/netFlux/jni/gencode.c:389: undefined reference to `pcap_parse'
/home/wxb/netFlux/bin/ndk/local/armeabi/libpcap.a(nametoaddr.o): In function `pcap_ether_hostton':
/home/wxb/netFlux/jni/nametoaddr.c:477: undefined reference to `ether_hostton'
/home/wxb/netFlux/bin/ndk/local/armeabi/libpcap.a(scanner.o): In function `yylex':
/home/wxb/netFlux/jni/scanner.l:336: undefined reference to `pcap_lval'
/home/wxb/netFlux/bin/ndk/local/armeabi/libpcap.a(scanner.o): In function `yy_get_next_buffer':
/home/wxb/netFlux/jni/<stdout>:3739: undefined reference to `pcap_lval'
collect2: ld returned 1 exit status

The libpcap code is from android.git.kernel.org Git.

Should I compile the whole Android source code?
where is the missing function `pcap_parse', `ether_hostton',`pcap_lval' ?
Is there some source I need to add to the compile?


Android-ndk-r4
make 3.8.1
ubuntu 9.10
 

BEST TECH IN 2023

We've been tracking upcoming products and ranking the best tech since 2007. Thanks for trusting our opinion: we get rewarded through affiliate links that earn us a commission and we invite you to learn more about us.

Smartphones