Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Feb 2008 07:24:09 -0500
From:      Gerard <gerard@seibercom.net>
To:        freebsd-questions@freebsd.org
Subject:   Re: Libnet in FreeBSD
Message-ID:  <20080205072409.73621f48@scorpio>
In-Reply-To: <7c7927920802041930y1b209944ice740f47d006cf83@mail.gmail.com>
References:  <7c7927920802040954u948a5ebga929f11a2fa76a45@mail.gmail.com> <200802041929.32973.fbsd.questions@rachie.is-a-geek.net> <7c7927920802041036v79bc635h34c51f747384b0ad@mail.gmail.com> <200802042041.57804.fbsd.questions@rachie.is-a-geek.net> <7c7927920802041930y1b209944ice740f47d006cf83@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--Sig_/EanK2wiZV5gz19QEqNaTB1n
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: quoted-printable

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


> On Feb 4, 2008 2:41 PM, Mel <fbsd.questions@rachie.is-a-geek.net>
> wrote:
>=20
> > 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=3Ddns
> > LDADD=3D-lnet
> > LDFLAGS+=3D-L/usr/local/lib/libnet11
> >
> > .include <bsd.prog.mk>
> > EOF
> >
> > then type make :)
> > --
> > Mel

> Sorry I'm not getting this.......
>=20
> 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!


--=20

Gerard
gerard@seibercom.net

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


--Sig_/EanK2wiZV5gz19QEqNaTB1n
Content-Type: application/pgp-signature; name=signature.asc
Content-Disposition: attachment; filename=signature.asc

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.8 (FreeBSD)

iEYEARECAAYFAkeoVWoACgkQ6DWTaTcTwMm1nACg1pxnKSVBObO/4r3cjjMfCqeW
ZkUAnjoFKus3QrjV8xfOemd8azB9jFm+
=LwnW
-----END PGP SIGNATURE-----

--Sig_/EanK2wiZV5gz19QEqNaTB1n--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20080205072409.73621f48>