Click to See Complete Forum and Search --> : cannot find -lpcap.......
nasim751
02-13-2008, 02:42 AM
hello,
i install cross-compile software but can't access libpcap library and getting this problem................
root@localhost:/home/nasim/Desktop/Done# arm-linux-gcc -o des des.c -lpcap -lnet
/usr/local/hybus-arm-linux-R1.1/arm-linux/bin/ld: cannot find -lpcap
collect2: ld returned 1 exit status
how you will deal this problem?
regards
ahmed
JohnT
02-13-2008, 06:08 AM
http://www.justlinux.com/forum/archive/index.php/t-95586.html
bwkaz
02-14-2008, 07:56 PM
Yep, like that post said, you need libpcap.
(Actually since you're compiling, you need libpcap-dev or libpcap-devel or something like that.)
(Er, wait, no, I take that back -- you're cross-compiling. That means you need to get a cross-compiled libpcap.a or libpcap.so file to link against (one that was built for the ARM CPU). You'll need to either build it yourself (using the cross-compiler) or find a pre-built version somewhere.)
nasim751
02-14-2008, 10:37 PM
hello
i already install lattest libpcap version with libpcap-dev or libpcap-devel. you mentioned that pre-built version. Can you give me any link for download?
regards
Ahmed
bwkaz
02-15-2008, 09:11 PM
i already install lattest libpcap version with libpcap-dev or libpcap-devel. OK, that will get you the library that was compiled for either x86 or x86-64 (depending on whether you're using a 32-bit or 64-bit distro).
But that won't get you a version that was compiled for ARM. And that is what you need.
you mentioned that pre-built version. Can you give me any link for download? Since I don't know what distro you use, or how (or whether) that distro would provide packages for other CPU architectures, or whether you'd be able to find third-party packages for libpcap-on-ARM, no, I can't give you a link. I can point you to the libpcap download page (http://www.tcpdump.org/release/), but that will only help if you plan on compiling the entire libpcap library for ARM yourself. I would not recommend that if you can help it.
Instead, I'd try doing some Googling for (e.g.) "libpcap ARM" or similar, to see if you can find a binary package that way.
(Note that you'll also need libnet, not just libpcap.)
kalpana
04-04-2008, 08:59 AM
Hi nazim
I face the same problem in installing the pcaplib...
any solution have u got till now to resolve the problem ??
Pls do share it, if so...
Thanks....
nasim751
04-06-2008, 03:00 AM
Hello Kalpana;
Sorry till now i can't solve this problem but trying if get result i will forward to you.
Thanks
kalpana
04-07-2008, 09:05 AM
hi Nazim...
I ve successfully cross compiled the kernel and the libpcap...
Wat abt u ? If not yet, pls share the status u hv reached so that we can solve ur problem if possible....