All of lore.kernel.org
 help / color / mirror / Atom feed
* error compiling nfqnl_test.c
@ 2006-05-21 19:15 Frank Abel Cancio Bello
  2006-05-22 14:06 ` Sebastien Tricaud
  0 siblings, 1 reply; 6+ messages in thread
From: Frank Abel Cancio Bello @ 2006-05-21 19:15 UTC (permalink / raw)
  To: netfilter

Hi all!

A newbie question:
When I try to compile "nfqnl_test.c" putting on command line:

"gcc -Wall -o nfqnl_test nfqnl_test.c"

the following error occur:

"
/tmp/cc8hh7RL.o: In function `print_pkt':nfqnl_test.c:(.text+0x15): undefined 
reference to `nfq_get_msg_packet_hdr'
:nfqnl_test.c:(.text+0x73): undefined reference to `nfq_get_nfmark'
:nfqnl_test.c:(.text+0x9a): undefined reference to `nfq_get_indev'
:nfqnl_test.c:(.text+0xc1): undefined reference to `nfq_get_outdev'
:nfqnl_test.c:(.text+0xef): undefined reference to `nfq_get_payload'
/tmp/cc8hh7RL.o: In function `cb':nfqnl_test.c:(.text+0x173): undefined 
reference to `nfq_set_verdict'
/tmp/cc8hh7RL.o: In function `main':nfqnl_test.c:(.text+0x1a5): undefined 
reference to `nfq_open'
:nfqnl_test.c:(.text+0x1fe): undefined reference to `nfq_unbind_pf'
:nfqnl_test.c:(.text+0x252): undefined reference to `nfq_bind_pf'
:nfqnl_test.c:(.text+0x2b6): undefined reference to `nfq_create_queue'
:nfqnl_test.c:(.text+0x317): undefined reference to `nfq_set_mode'
:nfqnl_test.c:(.text+0x357): undefined reference to `nfq_nfnlh'
:nfqnl_test.c:(.text+0x365): undefined reference to `nfnl_fd'
:nfqnl_test.c:(.text+0x392): undefined reference to `nfq_handle_packet'
:nfqnl_test.c:(.text+0x3dd): undefined reference to `nfq_destroy_queue'
:nfqnl_test.c:(.text+0x3f4): undefined reference to `nfq_close'
collect2: ld returned 1 exit status
"

What I must put a command line to compile the "nfqnl_test.c"

Salute
Frank Abel


__________________________________________

XIII Convención Científica de Ingeniería y Arquitectura
28/noviembre al 1/diciembre de 2006
Cujae, Ciudad de la Habana, Cuba
http://www.cujae.edu.cu/eventos/convencion


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error compiling nfqnl_test.c
  2006-05-21 19:15 error compiling nfqnl_test.c Frank Abel Cancio Bello
@ 2006-05-22 14:06 ` Sebastien Tricaud
  2006-05-22 14:42   ` Frank Abel Cancio Bello
  0 siblings, 1 reply; 6+ messages in thread
From: Sebastien Tricaud @ 2006-05-22 14:06 UTC (permalink / raw)
  To: Frank Abel Cancio Bello; +Cc: netfilter

Frank Abel Cancio Bello wrote:
> Hi all!
>
> A newbie question:
> When I try to compile "nfqnl_test.c" putting on command line:
>
> "gcc -Wall -o nfqnl_test nfqnl_test.c"
>
> the following error occur:
>   
[snip errors]

you forgot to include required library symbols:

gcc -Wall -o nfqnl_test nfqnl_test.c -lnfnetlink -lnetfilter_queue

will do





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error compiling nfqnl_test.c
  2006-05-22 14:06 ` Sebastien Tricaud
@ 2006-05-22 14:42   ` Frank Abel Cancio Bello
  2006-05-22 14:48     ` Rodrigo Montoro
  2006-05-22 14:49     ` Sietse van Zanen
  0 siblings, 2 replies; 6+ messages in thread
From: Frank Abel Cancio Bello @ 2006-05-22 14:42 UTC (permalink / raw)
  To: Sebastien Tricaud, netfilter

Thanks Sebastien!

Now the problem is when I try to run the binary, when I put on command line:

./nfqnl_test

the following error happend:

./nfqnl_test: error while loading shared libraries: libnfnetlink.so.0: cannot 
open shared object file: No such file or directory

Nevertheless my box have theses files:
/usr/local/lib/libnfnetlink.so.0
/usr/local/lib/libnfnetlink.so.0.0.0

Beside, when I install the libnfnetlink ("./configure;make;make install") I 
get a binary of nfqnl_test.c into utils directory and when I run it all is 
fine.

Salute
Frank Abel


On Monday 22 May 2006 10:06 am, you wrote:
> Frank Abel Cancio Bello wrote:
> > Hi all!
> >
> > A newbie question:
> > When I try to compile "nfqnl_test.c" putting on command line:
> >
> > "gcc -Wall -o nfqnl_test nfqnl_test.c"
> >
> > the following error occur:
>
> [snip errors]
>
> you forgot to include required library symbols:
>
> gcc -Wall -o nfqnl_test nfqnl_test.c -lnfnetlink -lnetfilter_queue
>
> will do


__________________________________________

XIII Convención Científica de Ingeniería y Arquitectura
28/noviembre al 1/diciembre de 2006
Cujae, Ciudad de la Habana, Cuba
http://www.cujae.edu.cu/eventos/convencion


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error compiling nfqnl_test.c
  2006-05-22 14:42   ` Frank Abel Cancio Bello
@ 2006-05-22 14:48     ` Rodrigo Montoro
  2006-05-22 16:44       ` Frank Abel Cancio Bello
  2006-05-22 14:49     ` Sietse van Zanen
  1 sibling, 1 reply; 6+ messages in thread
From: Rodrigo Montoro @ 2006-05-22 14:48 UTC (permalink / raw)
  To: Frank Abel Cancio Bello; +Cc: netfilter

  Try to run ldconfig
  If this fails ,try to edit /etc/ld.so.conf and add
  /usr/local/lib
  So run ldconfig again.

Att,

On 5/22/06, Frank Abel Cancio Bello <frankabel@tesla.cujae.edu.cu> wrote:
> Thanks Sebastien!
>
> Now the problem is when I try to run the binary, when I put on command line:
>
> ./nfqnl_test
>
> the following error happend:
>
> ./nfqnl_test: error while loading shared libraries: libnfnetlink.so.0: cannot
> open shared object file: No such file or directory
>
> Nevertheless my box have theses files:
> /usr/local/lib/libnfnetlink.so.0
> /usr/local/lib/libnfnetlink.so.0.0.0
>
> Beside, when I install the libnfnetlink ("./configure;make;make install") I
> get a binary of nfqnl_test.c into utils directory and when I run it all is
> fine.
>
> Salute
> Frank Abel
>
>
> On Monday 22 May 2006 10:06 am, you wrote:
> > Frank Abel Cancio Bello wrote:
> > > Hi all!
> > >
> > > A newbie question:
> > > When I try to compile "nfqnl_test.c" putting on command line:
> > >
> > > "gcc -Wall -o nfqnl_test nfqnl_test.c"
> > >
> > > the following error occur:
> >
> > [snip errors]
> >
> > you forgot to include required library symbols:
> >
> > gcc -Wall -o nfqnl_test nfqnl_test.c -lnfnetlink -lnetfilter_queue
> >
> > will do
>
>
> __________________________________________
>
> XIII Convención Científica de Ingeniería y Arquitectura
> 28/noviembre al 1/diciembre de 2006
> Cujae, Ciudad de la Habana, Cuba
> http://www.cujae.edu.cu/eventos/convencion
>
>


-- 
=====================
 Rodrigo Ribeiro Montoro
Desenvolvedor BRMAlinux
  spooker@brc.com.br
       RHCE/LPIC-I
=====================

^ permalink raw reply	[flat|nested] 6+ messages in thread

* RE: error compiling nfqnl_test.c
  2006-05-22 14:42   ` Frank Abel Cancio Bello
  2006-05-22 14:48     ` Rodrigo Montoro
@ 2006-05-22 14:49     ` Sietse van Zanen
  1 sibling, 0 replies; 6+ messages in thread
From: Sietse van Zanen @ 2006-05-22 14:49 UTC (permalink / raw)
  To: Frank Abel Cancio Bello, Sebastien Tricaud, netfilter

Add /usr/local/lib to ld.conf or LD_LIBRARY_PATH env variable.
 
-Sietse

________________________________

From: netfilter-bounces@lists.netfilter.org on behalf of Frank Abel Cancio Bello
Sent: Mon 22-May-06 16:42
To: Sebastien Tricaud; netfilter@lists.netfilter.org
Subject: Re: error compiling nfqnl_test.c



Thanks Sebastien!

Now the problem is when I try to run the binary, when I put on command line:

./nfqnl_test

the following error happend:

./nfqnl_test: error while loading shared libraries: libnfnetlink.so.0: cannot
open shared object file: No such file or directory

Nevertheless my box have theses files:
/usr/local/lib/libnfnetlink.so.0
/usr/local/lib/libnfnetlink.so.0.0.0

Beside, when I install the libnfnetlink ("./configure;make;make install") I
get a binary of nfqnl_test.c into utils directory and when I run it all is
fine.

Salute
Frank Abel


On Monday 22 May 2006 10:06 am, you wrote:
> Frank Abel Cancio Bello wrote:
> > Hi all!
> >
> > A newbie question:
> > When I try to compile "nfqnl_test.c" putting on command line:
> >
> > "gcc -Wall -o nfqnl_test nfqnl_test.c"
> >
> > the following error occur:
>
> [snip errors]
>
> you forgot to include required library symbols:
>
> gcc -Wall -o nfqnl_test nfqnl_test.c -lnfnetlink -lnetfilter_queue
>
> will do


__________________________________________

XIII Convención Científica de Ingeniería y Arquitectura
28/noviembre al 1/diciembre de 2006
Cujae, Ciudad de la Habana, Cuba
http://www.cujae.edu.cu/eventos/convencion





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: error compiling nfqnl_test.c
  2006-05-22 14:48     ` Rodrigo Montoro
@ 2006-05-22 16:44       ` Frank Abel Cancio Bello
  0 siblings, 0 replies; 6+ messages in thread
From: Frank Abel Cancio Bello @ 2006-05-22 16:44 UTC (permalink / raw)
  To: Rodrigo Montoro, netfilter

Thanks very much!!!
I'm advancing... lol

I need modify the nfqnl_test.c, specifically  I need access to ip.h and the=
=20
icmp.h headers. So I add "#include <linux/ip.h>" to the beginning of the fi=
le=20
nfqnl_test.c.

and when I try to compile with

gcc -Wall -o nfqnl_test nfqnl_test.c -lnfnetlink -lnetfilter_queue

the following errors:

In file included from nfqnl_test.c:10:
/usr/include/linux/ip.h:93:2: error: #error "Endian problem - this didn't=20
happen"
=2E......

the second line say something funy... :)

somebody known how solve this problem?


Salute
=46rank Abel

On Monday 22 May 2006 10:48 am, you wrote:
>   Try to run ldconfig
>   If this fails ,try to edit /etc/ld.so.conf and add
>   /usr/local/lib
>   So run ldconfig again.
>
> Att,
>
> On 5/22/06, Frank Abel Cancio Bello <frankabel@tesla.cujae.edu.cu> wrote:
> > Thanks Sebastien!
> >
> > Now the problem is when I try to run the binary, when I put on command
> > line:
> >
> > ./nfqnl_test
> >
> > the following error happend:
> >
> > ./nfqnl_test: error while loading shared libraries: libnfnetlink.so.0:
> > cannot open shared object file: No such file or directory
> >
> > Nevertheless my box have theses files:
> > /usr/local/lib/libnfnetlink.so.0
> > /usr/local/lib/libnfnetlink.so.0.0.0
> >
> > Beside, when I install the libnfnetlink ("./configure;make;make install=
")
> > I get a binary of nfqnl_test.c into utils directory and when I run it a=
ll
> > is fine.
> >
> > Salute
> > Frank Abel
> >
> > On Monday 22 May 2006 10:06 am, you wrote:
> > > Frank Abel Cancio Bello wrote:
> > > > Hi all!
> > > >
> > > > A newbie question:
> > > > When I try to compile "nfqnl_test.c" putting on command line:
> > > >
> > > > "gcc -Wall -o nfqnl_test nfqnl_test.c"
> > > >
> > > > the following error occur:
> > >
> > > [snip errors]
> > >
> > > you forgot to include required library symbols:
> > >
> > > gcc -Wall -o nfqnl_test nfqnl_test.c -lnfnetlink -lnetfilter_queue
> > >
> > > will do
> >
> > __________________________________________
> >
> > XIII Convenci=C3=B3n Cient=C3=ADfica de Ingenier=C3=ADa y Arquitectura
> > 28/noviembre al 1/diciembre de 2006
> > Cujae, Ciudad de la Habana, Cuba
> > http://www.cujae.edu.cu/eventos/convencion


__________________________________________

XIII Convención Científica de Ingeniería y Arquitectura
28/noviembre al 1/diciembre de 2006
Cujae, Ciudad de la Habana, Cuba
http://www.cujae.edu.cu/eventos/convencion


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-05-22 16:44 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-21 19:15 error compiling nfqnl_test.c Frank Abel Cancio Bello
2006-05-22 14:06 ` Sebastien Tricaud
2006-05-22 14:42   ` Frank Abel Cancio Bello
2006-05-22 14:48     ` Rodrigo Montoro
2006-05-22 16:44       ` Frank Abel Cancio Bello
2006-05-22 14:49     ` Sietse van Zanen

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.