Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-20 Thread Jamie Bainbridge
On 21 November 2015 at 08:15, liu wen wrote: > thank you very much! > then how to compile the source codes to make a libpcap.a from the libpcap > source codes? $ tar xf libpcap-1.7.4.tar.gz $ cd libpcap-1.7.4/ $ ./configure $ make $ find . -name libpcap.a ./libpcap.a You may have to install some

Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-20 Thread liu wen
thank you very much! then how to compile the source codes to make a libpcap.a from the libpcap source codes? On Fri, Nov 20, 2015 at 6:58 PM, Guy Harris wrote: > > On Nov 20, 2015, at 12:32 AM, Jamie Bainbridge > wrote: > > > Fedora has glibc-static, but no libpcap-static. > > Then he'll have t

Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-20 Thread Guy Harris
On Nov 20, 2015, at 12:32 AM, Jamie Bainbridge wrote: > Fedora has glibc-static, but no libpcap-static. Then he'll have to build libpcap from source. I would suggest building with the *latest* version of libpcap from tcpdump.org, currently 1.7.4: http://www.tcpdump.org/#latest-relea

Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-20 Thread Jamie Bainbridge
On 20 November 2015 at 17:39, Guy Harris wrote: > > On Nov 19, 2015, at 4:35 PM, liu wen wrote: > >> On Fri, Nov 20, 2015 at 12:52 AM, Guy Harris wrote: >> >>> On Nov 19, 2015, at 3:29 PM, liu wen wrote: >>> I want to statically compile a C project in a laptop(fedora), using command l

Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-19 Thread Guy Harris
On Nov 19, 2015, at 4:35 PM, liu wen wrote: > On Fri, Nov 20, 2015 at 12:52 AM, Guy Harris wrote: > >> On Nov 19, 2015, at 3:29 PM, liu wen wrote: >> >>> I want to statically compile a C project in a laptop(fedora), using command >>> line like: >>> >>> gcc -o myprogram -static main.c ... -l

Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-19 Thread liu wen
On Fri, Nov 20, 2015 at 12:52 AM, Guy Harris wrote: > > On Nov 19, 2015, at 3:29 PM, liu wen wrote: > > > I want to statically compile a C project in a laptop(fedora), using > command > > line like: > > > > gcc -o myprogram -static main.c ... -levent -lpcap > > > > but I get error: > > > > /usr/

Re: [tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-19 Thread Guy Harris
On Nov 19, 2015, at 3:29 PM, liu wen wrote: > I want to statically compile a C project in a laptop(fedora), using command > line like: > > gcc -o myprogram -static main.c ... -levent -lpcap > > but I get error: > > /usr/bin/ld: cannot find -lpcap > /usr/bin/ld: cannot find -lc > > I tried to

[tcpdump-workers] Cannot find -lpcap when statically compiling a C project

2015-11-19 Thread liu wen
I want to statically compile a C project in a laptop(fedora), using command line like: gcc -o myprogram -static main.c ... -levent -lpcap but I get error: /usr/bin/ld: cannot find -lpcap /usr/bin/ld: cannot find -lc I tried to locate libpcap.a and find no such a file if I compile dynamically,