Libnet in FreeBSD

Gerard gerard at seibercom.net
Tue Feb 5 12:24:31 UTC 2008


On Mon, 4 Feb 2008 22:30:47 -0500
"Bhuvaneswari Ramkumar" <ramkumar at iastate.edu> wrote:


> On Feb 4, 2008 2:41 PM, Mel <fbsd.questions at rachie.is-a-geek.net>
> wrote:
> 
> > On Monday 04 February 2008 19:36:17 Bhuvaneswari Ramkumar wrote:
> >
> > > well actually, even the sample applications seem to have the same
> > problem,
> > > So I'm guessing its some installation issue:
> > >
> > > # cc dns.c
> > > /var/tmp//ccImyVt1.o(.text+0x88) : In function 'main' : :
> > > undefined reference to 'libnet_init'
> > >
> > > This is how my compilation result reads for the dns.c sample
> > application.
> > > Says the same for all libnet calls.
> >
> > Linking 101. If you used the port (/usr/ports/net/libnet) then:
> >
> > cc -L/usr/local/lib/libnet11 -lnet dns.c
> >
> > or:
> > cat <<EOF >BSDmakefile
> > PROG=dns
> > LDADD=-lnet
> > LDFLAGS+=-L/usr/local/lib/libnet11
> >
> > .include <bsd.prog.mk>
> > EOF
> >
> > then type make :)
> > --
> > Mel

> Sorry I'm not getting this.......
> 
> what did u want me to try ?
> I'm not using the ports collection and have installed libnet 1.1.2.1
> in root.
> Did u say I had to add these lines to the make-file of my app.c
> sample file or to the BSD make-file in usr/share/mk or is it
> something else ? .........also my /usr/local/lib doesnt have any
> lib11 file like that. Just wanted to understand it before I tried it.

Please don't "top post". If you don't know what that means, Google for
it.

Is there any specific reason you choose not to use the ports system to
install 'libnet'? It is available!


-- 

Gerard
gerard at seibercom.net

Best of all is never to have been born.
Second best is to die soon.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-questions/attachments/20080205/5524e8b3/signature.pgp


More information about the freebsd-questions mailing list