From: Craig Davison <cd@securityfocus.com>
To: netfilter@lists.netfilter.org
Subject: Link time problems with libipq example code
Date: Fri, 20 Dec 2002 15:44:05 -0700 [thread overview]
Message-ID: <20021220224405.GB28191@securityfocus.com> (raw)
Hello,
I've been trying to compile the libipq example code in the libipq man page.
My kernel is 2.4.18, distributed by RedHat as 2.4.18-14. I made a symlink to the kernel source at /usr/src/linux.
I built ipchains 1.2.7a as follows:
make
su
make install-devel
I copied the code from the man page into a file called ipqtst.c and compiled:
gcc -I/usr/local/include -L/usr/local/lib -lipq -o ipqtst ipqtst.c
/tmp/ccGDqSOi.o: In function `die':
/tmp/ccGDqSOi.o(.text+0xf): undefined reference to `ipq_perror'
/tmp/ccGDqSOi.o(.text+0x1d): undefined reference to `ipq_destroy_handle'
/tmp/ccGDqSOi.o: In function `main':
/tmp/ccGDqSOi.o(.text+0x49): undefined reference to `ipq_create_handle'
/tmp/ccGDqSOi.o(.text+0x81): undefined reference to `ipq_set_mode'
/tmp/ccGDqSOi.o(.text+0xb8): undefined reference to `ipq_read'
/tmp/ccGDqSOi.o(.text+0xe4): undefined reference to `ipq_message_type'
/tmp/ccGDqSOi.o(.text+0x116): undefined reference to `ipq_get_msgerr'
/tmp/ccGDqSOi.o(.text+0x141): undefined reference to `ipq_get_packet'
/tmp/ccGDqSOi.o(.text+0x166): undefined reference to `ipq_set_verdict'
collect2: ld returned 1 exit status
I get the same errors when I compile statically:
gcc -static -I/usr/local/include -L/usr/local/lib -lipq -o ipqtst ipqtst.c
Is libipq not the right thing to link against? Am I doing something else wrong (did I build ipchains incorrectly?)
--
Craig Davison
Symantec Corporation
+1 (403) 213-3939 ext. 228
next reply other threads:[~2002-12-20 22:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-12-20 22:44 Craig Davison [this message]
2002-12-20 23:01 ` Link time problems with libipq example code Craig Davison
2002-12-21 5:29 ` Narendra Prabhu. B
2002-12-23 18:07 ` Craig Davison
2002-12-23 19:05 ` Ranjeet Shetye
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20021220224405.GB28191@securityfocus.com \
--to=cd@securityfocus.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox