Re: very important
Gordon Messmer <[email protected]> Fri, 12 Sep 2003 12:58:09 -0700
| Newsgroups | gmane.linux.redhat.release.enigma |
|---|---|
| Message-ID | <[email protected]> |
First, learn to ask intelligent questions: http://www.catb.org/~esr/faqs/smart-questions.html Your subject is worse than useless. ali awan wrote: > > I m facing a problem in using libpcap in a C program on linux 7.2. I > have libpcap-0.7.2 installed in the root directory. Installed by hand? You probably could save yourself a lot of effort by using the libpcap package provided by Red Hat. > and have copied the > folder in the include directory. Remove it, that's not where it belongs. > but when I compile my program it gives > the following error: > > /tmp/ccSuKW14.o(.text+0x1ab):undefined reference to "pcap_lookupdev" You need to tell the build scripts where to find libpcap. That may be: LDFLAGS="-lpcap -L/root/libpcap-0.7.2" ./configure ; make Hard to say without any information about what you're trying to build. In any case, the -L argument is missing from the build you're attempting, and it needs to be added. Or just install Red Hat's package, and everything should work without additional effort on your part. > the same error comes on all the libpcap functions. I have also tried to > install libpcap in the include folder and then include the file but it > doesnt work even then. > What should i do. Remove the pcap library from any extra places in the filesystem you've put it, and follow the instructions above.