Date: Mon, 4 Feb 2008 14:53:22 -0500 From: "Bhuvaneswari Ramkumar" <ramkumar@iastate.edu> To: Mel <fbsd.questions@rachie.is-a-geek.net> Cc: freebsd-questions@freebsd.org Subject: Re: Libnet in FreeBSD Message-ID: <7c7927920802041153o65f6d0a9ofd376f5ed48ba900@mail.gmail.com> In-Reply-To: <200802042041.57804.fbsd.questions@rachie.is-a-geek.net> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
Question: Do I need to do this for every libnet app I compile, like modify the PROG variable in the app's folder .... even for the sample aplications already compiled & set ? Aside this, if someone could tell me the exact compilation steps for Libnet, it would be really helpful. Thanks Bhuvana On Feb 4, 2008 2:41 PM, Mel <fbsd.questions@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 >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?7c7927920802041153o65f6d0a9ofd376f5ed48ba900>