<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: ld: cannot find -lpcap in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266846#M715098</link>
    <description>Phrrrt. writing these posts took longer than building the stuff :]&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
    <pubDate>Wed, 05 May 2004 09:21:20 GMT</pubDate>
    <dc:creator>H.Merijn Brand (procura</dc:creator>
    <dc:date>2004-05-05T09:21:20Z</dc:date>
    <item>
      <title>ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266830#M715082</link>
      <description>Trying to compile dnstop:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://dns.measurement-factory.com/tools/dnstop/" target="_blank"&gt;http://dns.measurement-factory.com/tools/dnstop/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Had to modify Makefile to:&lt;BR /&gt;&lt;BR /&gt;CFLAGS=-g -Wall -I/usr/local/include -I/usr/local/lib&lt;BR /&gt;PROG=dnstop&lt;BR /&gt;DATE!=date +%Y%m%d&lt;BR /&gt;CC=gcc&lt;BR /&gt;&lt;BR /&gt;SRCS=   $(PROG).c \&lt;BR /&gt;        known_tlds.h&lt;BR /&gt;&lt;BR /&gt;# You may need to uncomment this, esp on Solaris&lt;BR /&gt;XTRALIBS= #-lnsl -lresolv -lsocket&lt;BR /&gt;&lt;BR /&gt;all: $(PROG)&lt;BR /&gt;&lt;BR /&gt;$(PROG): $(PROG).o&lt;BR /&gt;        $(CC) $(CFLAGS) -o $@ $(PROG).o -lpcap -lcurses $(XTRALIBS)&lt;BR /&gt;&lt;BR /&gt;clean:&lt;BR /&gt;        rm -f $(PROG) $(PROG).o $(PROG).core $(PROG).c~&lt;BR /&gt;&lt;BR /&gt;tar:&lt;BR /&gt;        mkdir $(PROG)-$(DATE)&lt;BR /&gt;        cp -p LICENSE CHANGES $(SRCS) dnstop.8 Makefile $(PROG)-$(DATE)&lt;BR /&gt;        tar czvf $(PROG)-$(DATE).tar.gz $(PROG)-$(DATE)&lt;BR /&gt;        chmod 444 $(PROG)-$(DATE).tar.gz&lt;BR /&gt;        rm -rf $(PROG)-$(DATE)&lt;BR /&gt;sha1:root:/usr/local/src/dnstop-20040309 # cat Makefile&lt;BR /&gt;CFLAGS=-g -Wall -I/usr/local/include -I/usr/local/lib&lt;BR /&gt;PROG=dnstop&lt;BR /&gt;DATE!=date +%Y%m%d&lt;BR /&gt;CC=gcc&lt;BR /&gt;&lt;BR /&gt;SRCS=   $(PROG).c \&lt;BR /&gt;        known_tlds.h&lt;BR /&gt;&lt;BR /&gt;# You may need to uncomment this, esp on Solaris&lt;BR /&gt;XTRALIBS= #-lnsl -lresolv -lsocket&lt;BR /&gt;&lt;BR /&gt;all: $(PROG)&lt;BR /&gt;&lt;BR /&gt;$(PROG): $(PROG).o&lt;BR /&gt;        $(CC) $(CFLAGS) -o $@ $(PROG).o -lpcap -lcurses $(XTRALIBS)&lt;BR /&gt;&lt;BR /&gt;clean:&lt;BR /&gt;        rm -f $(PROG) $(PROG).o $(PROG).core $(PROG).c~&lt;BR /&gt;&lt;BR /&gt;tar:&lt;BR /&gt;        mkdir $(PROG)-$(DATE)&lt;BR /&gt;        cp -p LICENSE CHANGES $(SRCS) dnstop.8 Makefile $(PROG)-$(DATE)&lt;BR /&gt;        tar czvf $(PROG)-$(DATE).tar.gz $(PROG)-$(DATE)&lt;BR /&gt;        chmod 444 $(PROG)-$(DATE).tar.gz&lt;BR /&gt;        rm -rf $(PROG)-$(DATE)&lt;BR /&gt;&lt;BR /&gt;Using gcc version 3.3.2&lt;BR /&gt;&lt;BR /&gt;I installed these first:&lt;BR /&gt;libpcap-0.8.1-sd-11.00.depot&lt;BR /&gt;tcpdump-3.8.1-sd-11.00.depot&lt;BR /&gt;bison-1.875-sd-11.00.depot&lt;BR /&gt;flex-2.5.4a-sd-11.00.depot&lt;BR /&gt;&lt;BR /&gt;I try make all from &lt;BR /&gt;&lt;BR /&gt;/usr/local/src/dnstop-20040309&lt;BR /&gt;&lt;BR /&gt;        gcc -g -Wall -I/usr/local/include -I/usr/local/lib -o dnstop dnstop.o -lpcap -lcurses&lt;BR /&gt;/opt/pa20_64/bin/../lib/gcc-lib/hppa64-hp-hpux11.11/3.3.2/../../../../hppa64-hp-hpux11.11/bin/ld: cannot find -lpcap&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;Stop.&lt;BR /&gt;&lt;BR /&gt;I'm compiling as root on HP-UX 11.11.&lt;BR /&gt;&lt;BR /&gt;Thanks...Geoff&lt;BR /&gt;</description>
      <pubDate>Tue, 04 May 2004 09:06:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266830#M715082</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T09:06:00Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266831#M715083</link>
      <description>I would take the box at its word. Either install libpcap or alter the linker's library search path to include the location of your libpcap file. It's also possible that libpcap isn't even needed so youi could try altering the makefile to remove the -lpcap statement. -lpcap is linker shorthand for libpcap.a or libpcap.sl in the directories specifed by the linkers library search path.&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/libpcap-0.8.1/" target="_blank"&gt;http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/libpcap-0.8.1/&lt;/A&gt;</description>
      <pubDate>Tue, 04 May 2004 09:13:09 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266831#M715083</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-05-04T09:13:09Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266832#M715084</link>
      <description>Yes, I did install libpcap...&lt;BR /&gt;&lt;BR /&gt;I had to add -I/usr/local/include -I/usr/local/lib to the CFLAGS for it to see pcap.h and pcap-bpf.h&lt;BR /&gt;&lt;BR /&gt;libpcap.a and libpcap.sl are in /usr/local/lib/&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 04 May 2004 09:23:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266832#M715084</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T09:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266833#M715085</link>
      <description>Okay - getting somewhere:&lt;BR /&gt;&lt;BR /&gt;#  export LPATH=/usr/local/lib:/usr/lib&lt;BR /&gt;# make all&lt;BR /&gt;        gcc -g -Wall -I/usr/local/include -I/usr/local/lib -o dnstop dnstop.o -lpcap -lcurses&lt;BR /&gt;/usr/lib/crt0.o: file not recognized: File format not recognized&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;Stop.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 04 May 2004 09:27:00 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266833#M715085</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T09:27:00Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266834#M715086</link>
      <description>you do not by accident run a 64bit gcc, now do you?&lt;BR /&gt;&lt;BR /&gt;Hmm, I guess you do.&lt;BR /&gt;Make your life easier and rename is to gcc64&lt;BR /&gt;&lt;BR /&gt;64bit objects do NOT mix with 32bit objects&lt;BR /&gt;&lt;BR /&gt;all objects (including crt0.o) in /usr/lib are 32 bit&lt;BR /&gt;64bit objects are in /usr/lib/pa20_64&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Tue, 04 May 2004 09:46:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266834#M715086</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-05-04T09:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266835#M715087</link>
      <description>Ah ha - Merijn - I do:&lt;BR /&gt;&lt;BR /&gt;# which gcc&lt;BR /&gt;/opt/pa20_64/bin/gcc&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;So I tried:&lt;BR /&gt;&lt;BR /&gt;export LPATH=/usr/local/lib&lt;BR /&gt;&lt;BR /&gt;Now I get:&lt;BR /&gt;&lt;BR /&gt;# make all&lt;BR /&gt;        gcc -g -Wall -I/usr/local/include -I/usr/local/lib -o dnstop dnstop.o -lpcap -lcurses&lt;BR /&gt;/usr/local/lib/libpcap.sl: file not recognized: File format not recognized&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;Stop.&lt;BR /&gt;&lt;BR /&gt;# file /usr/local/lib/libpcap.sl&lt;BR /&gt;/usr/local/lib/libpcap.sl:      PA-RISC1.1 shared library&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;# what /usr/local/lib/libpcap.sl&lt;BR /&gt;/usr/local/lib/libpcap.sl:&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/fad-gifc.c,v 1.4.2.1 2003/11/15 23:26:39 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/inet.c,v 1.58.2.1 2003/11/15 23:26:41 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/gencode.c,v 1.193.2.2 2003/12/18 20:37:12 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/optimize.c,v 1.76.2.3 2003/12/22 00:26:36 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/etherent.c,v 1.21.6.1 2003/11/15 23:26:38 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/bpf/net/bpf_filter.c,v 1.43.2.1 2003/11/15 23:26:49 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/bpf_image.c,v 1.25.2.1 2003/11/15 23:26:38 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/bpf_dump.c,v 1.13.2.1 2003/11/15 23:26:37 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/pcap-dlpi.c,v 1.91.2.3 2003/11/21 10:20:46 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/pcap.c,v 1.63.2.6 2003/11/21 10:20:49 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/nametoaddr.c,v 1.68.2.3 2003/11/19 18:13:48 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/savefile.c,v 1.92.2.8 2003/12/21 21:52:36 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/scanner.l,v 1.95.2.2 2003/12/16 05:20:44 guy Exp $ (LBL)&lt;BR /&gt;         $Header: /tcpdump/master/libpcap/grammar.y,v 1.79.2.2 2003/12/16 05:20:44 guy Exp $ (LBL)&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I also have &lt;BR /&gt;# /opt/gcc/bin/gcc -v&lt;BR /&gt;Reading specs from /opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/specs&lt;BR /&gt;gcc version 2.95.3 20010315 (release)&lt;BR /&gt;&lt;BR /&gt;So I'm going to try that version...&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 04 May 2004 10:09:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266835#M715087</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T10:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266836#M715088</link>
      <description>With 64 bit gcc:&lt;BR /&gt;&lt;BR /&gt;# make clean&lt;BR /&gt;rm -f dnstop dnstop.o dnstop.core dnstop.c~&lt;BR /&gt;# export LPATH=/usr/local/lib&lt;BR /&gt;# make all&lt;BR /&gt;        gcc -g -Wall -I/usr/local/include -I/usr/local/lib -c dnstop.c&lt;BR /&gt;dnstop.c: In function `StringCounter_report':&lt;BR /&gt;dnstop.c:751: warning: implicit declaration of function `getmaxy'&lt;BR /&gt;        gcc -g -Wall -I/usr/local/include -I/usr/local/lib -o dnstop dnstop.o -lpcap -lcurses&lt;BR /&gt;/usr/local/lib/libpcap.sl: file not recognized: File format not recognized&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;Stop.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;With gcc 2.95:&lt;BR /&gt;&lt;BR /&gt;# make clean&lt;BR /&gt;        rm -f dnstop dnstop.o dnstop.core dnstop.c~&lt;BR /&gt;# make all&lt;BR /&gt;        /opt/gcc/bin/gcc -g -Wall -I/usr/local/include -I/usr/local/lib -c dnstop.c&lt;BR /&gt;In file included from /usr/local/include/pcap.h:51,&lt;BR /&gt;                 from dnstop.c:16:&lt;BR /&gt;/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: `__va__list' redefined&lt;BR /&gt;/usr/include/sys/stdsyms.h:422: warning: this is the location of the previous definition&lt;BR /&gt;In file included from dnstop.c:19:&lt;BR /&gt;/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdlib.h:28: warning: `__va__list' redefined&lt;BR /&gt;/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/stdio.h:30: warning: this is the location of the previous definition&lt;BR /&gt;In file included from dnstop.c:27:&lt;BR /&gt;/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/arpa/nameser.h:94: warning: `/*' within comment&lt;BR /&gt;In file included from dnstop.c:29:&lt;BR /&gt;/usr/include/sys/socket.h:484: parse error before `sendfile'&lt;BR /&gt;/usr/include/sys/socket.h:484: parse error before `bsize_t'&lt;BR /&gt;/usr/include/sys/socket.h:485: warning: data definition has no type or storage class&lt;BR /&gt;/usr/include/sys/socket.h:486: parse error before `sendpath'&lt;BR /&gt;/usr/include/sys/socket.h:486: parse error before `bsize_t'&lt;BR /&gt;/usr/include/sys/socket.h:487: warning: data definition has no type or storage class&lt;BR /&gt;In file included from /usr/include/sys/mp.h:55,&lt;BR /&gt;                 from /usr/include/sys/malloc.h:59,&lt;BR /&gt;                 from /usr/include/net/netmp.h:53,&lt;BR /&gt;                 from /usr/include/net/if.h:59,&lt;BR /&gt;                 from dnstop.c:31:&lt;BR /&gt;/usr/include/machine/sys/setjmp.h:45: redefinition of `struct label_t'&lt;BR /&gt;/usr/include/machine/sys/setjmp.h:59: warning: redefinition of `label_t'&lt;BR /&gt;/opt/gcc/lib/gcc-lib/hppa2.0n-hp-hpux11.00/2.95.3/include/sys/types.h:369: warning: `label_t' previously declared here&lt;BR /&gt;dnstop.c: In function `StringCounter_report':&lt;BR /&gt;dnstop.c:751: warning: implicit declaration of function `getmaxy'&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;Stop.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Sigh.......&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 04 May 2004 10:27:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266836#M715088</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T10:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266837#M715089</link>
      <description>Ok - started over - removed my gcc 2.9.5 and installed:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://hpux.ee.ualberta.ca/hppd/hpux/Gnu/gcc-3.3.2/" target="_blank"&gt;http://hpux.ee.ualberta.ca/hppd/hpux/Gnu/gcc-3.3.2/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The Makefile is default except for CC=/usr/local/bin/gcc&lt;BR /&gt;&lt;BR /&gt;# make clean&lt;BR /&gt;        rm -f dnstop dnstop.o dnstop.core dnstop.c~&lt;BR /&gt;&lt;BR /&gt;# make all&lt;BR /&gt;        /usr/local/bin/gcc -g -Wall -c dnstop.c&lt;BR /&gt;In file included from dnstop.c:29:&lt;BR /&gt;/usr/include/sys/socket.h:484: parse error before "sendfile"&lt;BR /&gt;/usr/include/sys/socket.h:485: parse error before "bsize_t"&lt;BR /&gt;/usr/include/sys/socket.h:486: parse error before "sendpath"&lt;BR /&gt;/usr/include/sys/socket.h:487: parse error before "bsize_t"&lt;BR /&gt;In file included from /usr/include/sys/mp.h:55,&lt;BR /&gt;                 from /usr/include/sys/malloc.h:59,&lt;BR /&gt;                 from /usr/include/net/netmp.h:53,&lt;BR /&gt;                 from /usr/include/net/if.h:59,&lt;BR /&gt;                 from dnstop.c:31:&lt;BR /&gt;/usr/include/machine/sys/setjmp.h:45: redefinition of `struct label_t'&lt;BR /&gt;dnstop.c: In function `StringCounter_report':&lt;BR /&gt;dnstop.c:751: warning: implicit declaration of function `getmaxy'&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;Stop.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks...Geoff</description>
      <pubDate>Tue, 04 May 2004 13:47:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266837#M715089</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T13:47:56Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266838#M715090</link>
      <description>Getting closer:&lt;BR /&gt;&lt;BR /&gt;# make all&lt;BR /&gt;        /usr/local/bin/gcc -g -Wall -c dnstop.c&lt;BR /&gt;In file included from dnstop.c:29:&lt;BR /&gt;/usr/include/sys/socket.h:484: parse error before "sendfile"&lt;BR /&gt;/usr/include/sys/socket.h:485: parse error before "bsize_t"&lt;BR /&gt;/usr/include/sys/socket.h:486: parse error before "sendpath"&lt;BR /&gt;/usr/include/sys/socket.h:487: parse error before "bsize_t"&lt;BR /&gt;dnstop.c: In function `StringCounter_report':&lt;BR /&gt;dnstop.c:751: warning: implicit declaration of function `getmaxy'&lt;BR /&gt;*** Error exit code 1&lt;BR /&gt;&lt;BR /&gt;Stop.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Here's the function:&lt;BR /&gt;StringCounter_report(StringCounter * list, char *what)&lt;BR /&gt;{&lt;BR /&gt;    StringCounter *sc;&lt;BR /&gt;    int nlines = getmaxy(w) - 6;&lt;BR /&gt;    printw("%-20s %9s %6s\n", what, "count", "%");&lt;BR /&gt;    printw("%-20s %9s %6s\n",&lt;BR /&gt;        "--------------------", "---------", "------");&lt;BR /&gt;    for (sc = list; sc; sc = sc-&amp;gt;next) {&lt;BR /&gt;        printw("%-20.20s %9d %6.1f\n",&lt;BR /&gt;            sc-&amp;gt;s,&lt;BR /&gt;            sc-&amp;gt;count,&lt;BR /&gt;            100.0 * sc-&amp;gt;count / query_count_total);&lt;BR /&gt;        if (0 == --nlines)&lt;BR /&gt;            break;&lt;BR /&gt;    }&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Tue, 04 May 2004 14:08:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266838#M715090</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T14:08:07Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266839#M715091</link>
      <description>I don't use the Gnu compilers but based upon your last error, I would say that you need to add &lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;&lt;BR /&gt;to your source file or include it in a header file before socket.h. NOTE: some typedefs are controlled by #ifdef's so that you may need to assert some defines in your makefile.&lt;BR /&gt;&lt;/SYS&gt;</description>
      <pubDate>Tue, 04 May 2004 14:15:32 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266839#M715091</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-05-04T14:15:32Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266840#M715092</link>
      <description>Thanks Clay - here's all the includes in dnstop.c:&lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;NETINET&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;PCAP.H&gt;&lt;BR /&gt;#include &lt;SIGNAL.H&gt;&lt;BR /&gt;#include &lt;STDIO.H&gt;&lt;BR /&gt;#include &lt;STDLIB.H&gt;&lt;BR /&gt;#include &lt;STRING.H&gt;&lt;BR /&gt;#include &lt;UNISTD.H&gt;&lt;BR /&gt;#include &lt;TIME.H&gt;&lt;BR /&gt;#include &lt;CTYPE.H&gt;&lt;BR /&gt;#include &lt;CURSES.H&gt;&lt;BR /&gt;#include &lt;ASSERT.H&gt;&lt;BR /&gt;#include &lt;ARPA&gt;&lt;BR /&gt;#include &lt;ARPA&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;SYS&gt;&lt;BR /&gt;#include &lt;NET&gt;&lt;BR /&gt;#include &lt;NET&gt;&lt;BR /&gt;#include &lt;NETINET&gt;&lt;BR /&gt;&lt;BR /&gt;#include &lt;NETINET&gt;&lt;BR /&gt;#include &lt;NETINET&gt;&lt;BR /&gt;#include &lt;NETINET&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff&lt;BR /&gt;&lt;/NETINET&gt;&lt;/NETINET&gt;&lt;/NETINET&gt;&lt;/NETINET&gt;&lt;/NET&gt;&lt;/NET&gt;&lt;/SYS&gt;&lt;/ARPA&gt;&lt;/ARPA&gt;&lt;/ASSERT.H&gt;&lt;/CURSES.H&gt;&lt;/CTYPE.H&gt;&lt;/TIME.H&gt;&lt;/UNISTD.H&gt;&lt;/STRING.H&gt;&lt;/STDLIB.H&gt;&lt;/STDIO.H&gt;&lt;/SIGNAL.H&gt;&lt;/PCAP.H&gt;&lt;/NETINET&gt;&lt;/SYS&gt;&lt;/SYS&gt;&lt;/SYS&gt;</description>
      <pubDate>Tue, 04 May 2004 14:31:24 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266840#M715092</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-04T14:31:24Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266841#M715093</link>
      <description>If you look in /usr/include/sys/socket.h at line 484 you will find a reference to a sbsize_t type. This is defined in /usr/include/sys/types.h. While this header file is included in your source file, the definition of sbsize_t or even the lack thereof is determined by some pre-processor #ifdef's and if defined()'s. You need to examine, sys/types.h to see which symbols you need to define and alter your makefile accordingly.&lt;BR /&gt;</description>
      <pubDate>Tue, 04 May 2004 14:48:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266841#M715093</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2004-05-04T14:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266842#M715094</link>
      <description>Okay - I give up - if anyone wants to take a crack at compiling dnstop, go for it.  If successful, please post here how you did it.&lt;BR /&gt;&lt;BR /&gt;Thanks...Geoff</description>
      <pubDate>Wed, 05 May 2004 08:52:25 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266842#M715094</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-05T08:52:25Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266843#M715095</link>
      <description>10 minutes :)&lt;BR /&gt;&lt;BR /&gt;where do you want to have it?&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Wed, 05 May 2004 09:09:37 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266843#M715095</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-05-05T09:09:37Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266844#M715096</link>
      <description>Merijn Wow!&lt;BR /&gt;&lt;BR /&gt;Did you use gcc or HP?&lt;BR /&gt;&lt;BR /&gt;How about on your site?&lt;BR /&gt;&lt;A href="http://www.cmve.net/~merijn/" target="_blank"&gt;http://www.cmve.net/~merijn/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Thanks...Geoff</description>
      <pubDate>Wed, 05 May 2004 09:12:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266844#M715096</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-05T09:12:18Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266845#M715097</link>
      <description>I used gcc, because that's what the Makefile said :)&lt;BR /&gt;&lt;BR /&gt;--8&amp;lt;-- Makefile&lt;BR /&gt;CFLAGS=-g -Wall -I/usr/local/include -I/pro/local/include&lt;BR /&gt;PROG=dnstop&lt;BR /&gt;DATE != date +%Y%m%d&lt;BR /&gt;CC=gcc&lt;BR /&gt;&lt;BR /&gt;SRCS= $(PROG).c \&lt;BR /&gt; known_tlds.h&lt;BR /&gt;&lt;BR /&gt;# You may need to uncomment this, esp on Solaris&lt;BR /&gt;XTRALIBS= # -lnsl -lresolv -lsocket&lt;BR /&gt;&lt;BR /&gt;all: $(PROG)&lt;BR /&gt;&lt;BR /&gt;$(PROG): $(PROG).o&lt;BR /&gt; $(CC) $(CFLAGS) -o $@ $(PROG).o -static -L/usr/local/lib -L/pro/local/lib -lpcap -lncurses $(XTRALIBS)&lt;BR /&gt;&lt;BR /&gt;clean:&lt;BR /&gt; rm -f $(PROG) $(PROG).o $(PROG).core $(PROG).c~&lt;BR /&gt;&lt;BR /&gt;tar:&lt;BR /&gt; mkdir $(PROG)-$(DATE)&lt;BR /&gt; cp -p LICENSE CHANGES $(SRCS) dnstop.8 Makefile $(PROG)-$(DATE)&lt;BR /&gt; tar czvf $(PROG)-$(DATE).tar.gz $(PROG)-$(DATE)&lt;BR /&gt; chmod 444 $(PROG)-$(DATE).tar.gz&lt;BR /&gt; rm -rf $(PROG)-$(DATE)&lt;BR /&gt;--&amp;gt;8---&lt;BR /&gt;&lt;BR /&gt;I added two include directories to CFLAGS (-I...)&lt;BR /&gt;I added to lib search path's to ld (-L...)&lt;BR /&gt;I added -statc to load, so I don't have to supply libpcap.sl and libncurses.sl&lt;BR /&gt;&lt;BR /&gt;I changed #include &lt;CURSES.H&gt; to #include &lt;NCURSES&gt; and -lcurses to -lncurses because curses doesn't know about getmaxy ()&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://www.cmve.net/~merijn/dnstop-20040309-pa2.0" target="_blank"&gt;http://www.cmve.net/~merijn/dnstop-20040309-pa2.0&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Enjoy. Have FUN! H.Merijn&lt;/NCURSES&gt;&lt;/CURSES.H&gt;</description>
      <pubDate>Wed, 05 May 2004 09:20:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266845#M715097</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-05-05T09:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266846#M715098</link>
      <description>Phrrrt. writing these posts took longer than building the stuff :]&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Wed, 05 May 2004 09:21:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266846#M715098</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-05-05T09:21:20Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266847#M715099</link>
      <description>Thanks Merijn!&lt;BR /&gt;&lt;BR /&gt;I'd still like to compile myself - almost got it working...did the same as you....had to add:&lt;BR /&gt;&lt;BR /&gt;#ifndef _BSIZE32_T&lt;BR /&gt;#    define _BSIZE32_T&lt;BR /&gt;     typedef int32_t   sbsize32_t;&lt;BR /&gt;     typedef uint32_t  bsize32_t;&lt;BR /&gt;#endif&lt;BR /&gt;#ifndef _BSIZE64_T&lt;BR /&gt;#    define _BSIZE64_T&lt;BR /&gt;#    if !defined(__STDC_32_MODE__)&lt;BR /&gt;        typedef int64_t  sbsize64_t;&lt;BR /&gt;        typedef uint64_t bsize64_t;&lt;BR /&gt;#    endif&lt;BR /&gt;#endif&lt;BR /&gt;#ifndef _BSIZE_T&lt;BR /&gt;#    define _BSIZE_T&lt;BR /&gt;#    if defined(_APP32_64BIT_OFF_T) || defined(_KERNEL)&lt;BR /&gt;        typedef int64_t  sbsize_t;&lt;BR /&gt;        typedef uint64_t bsize_t;&lt;BR /&gt;#    else&lt;BR /&gt;        typedef long  sbsize_t;&lt;BR /&gt;        typedef unsigned long bsize_t;&lt;BR /&gt;#    endif&lt;BR /&gt;#endif&lt;BR /&gt;&lt;BR /&gt;To bottom of /usr/local/lib/gcc-lib/hppa2.0n-hp-hpux11.00/3.2/include/sys/types.h before the last #endif&lt;BR /&gt;&lt;BR /&gt;Now I get:&lt;BR /&gt;&lt;BR /&gt;# gmake all&lt;BR /&gt;/usr/local/bin/gcc -g -Wall -I/usr/local/include   -c -o dnstop.o dnstop.c&lt;BR /&gt;cc1: warning: changing search order for system directory "/usr/local/include"&lt;BR /&gt;cc1: warning:   as it has already been specified as a non-system directory&lt;BR /&gt;/usr/local/bin/gcc -g -Wall -I/usr/local/include -o dnstop dnstop.o -static -L/usr/local/lib -lpcap -lncurses&lt;BR /&gt;/usr/ccs/bin/ld: Unsatisfied symbols:&lt;BR /&gt;   shl_load (first referenced in /usr/lib/libc.a(nss_deffinder.o)) (code)&lt;BR /&gt;   shl_findsym (first referenced in /usr/lib/libc.a(nss_deffinder.o)) (code)&lt;BR /&gt;collect2: ld returned 1 exit status&lt;BR /&gt;gmake: *** [dnstop] Error 1&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 05 May 2004 10:22:34 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266847#M715099</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-05T10:22:34Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266848#M715100</link>
      <description>add -lc_r or -ldld&lt;BR /&gt;&lt;BR /&gt;these symbols are in /usr/lib/dld.sl, libdld.sl, and libc_r.sl (the reentrant version of libc)&lt;BR /&gt;&lt;BR /&gt;Enjoy, Have FUN! H.Merijn</description>
      <pubDate>Wed, 05 May 2004 10:29:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266848#M715100</guid>
      <dc:creator>H.Merijn Brand (procura</dc:creator>
      <dc:date>2004-05-05T10:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: ld: cannot find -lpcap</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266849#M715101</link>
      <description>Merijn - done!&lt;BR /&gt;&lt;BR /&gt;Had to do it like this:&lt;BR /&gt;&lt;BR /&gt;CFLAGS=-g -Wall -l:libdld.sl -I/usr/local/include&lt;BR /&gt;&lt;BR /&gt;Otherwise I got&lt;BR /&gt;/usr/bin/ld: Can't find library: "dld"&lt;BR /&gt;&lt;BR /&gt;Thanks for all your help.&lt;BR /&gt;&lt;BR /&gt;Rgds...Geoff</description>
      <pubDate>Wed, 05 May 2004 10:37:29 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/ld-cannot-find-lpcap/m-p/3266849#M715101</guid>
      <dc:creator>Geoff Wild</dc:creator>
      <dc:date>2004-05-05T10:37:29Z</dc:date>
    </item>
  </channel>
</rss>

