problem with trying the example

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all,

I am new to netfilter and even linux. I just wish to try the example code in the man page of libipq (I saved it as test.c and have compiled it to test.o). But when I make it: #cc test.o -o test, the following errors showed up:

[root@kite1 netfilter]# cc test.o -o test
test.o(.text+0xf): In function `die':
: undefined reference to `ipq_perror'
test.o(.text+0x1d): In function `die':
: undefined reference to `ipq_destroy_handle'
test.o(.text+0x49): In function `main':
: undefined reference to `ipq_create_handle'
test.o(.text+0x81): In function `main':
: undefined reference to `ipq_set_mode'
test.o(.text+0xb8): In function `main':
: undefined reference to `ipq_read'
test.o(.text+0xe4): In function `main':
: undefined reference to `ipq_message_type'
test.o(.text+0x116): In function `main':
: undefined reference to `ipq_get_msgerr'
test.o(.text+0x141): In function `main':
: undefined reference to `ipq_get_packet'
test.o(.text+0x18c): In function `main':
: undefined reference to `ipq_set_verdict'
test.o(.text+0x1ce): In function `main':
: undefined reference to `ipq_set_verdict'
collect2: ld returned 1 exit status

I have installed iptables-1.2.9 following the instructions. Does it mean I have to link 'test.o' with another file (???.o or ???.so)? Thank you in advance!

Jee


[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux