Re: Libnet in FreeBSD

2008-02-05 Thread Bhuvaneswari Ramkumar
Question:  do I need to set the cflag & libs options in the libnet-config
file for the compiling and linking to happen correctly ?

Bhuvana

On Feb 5, 2008 12:05 PM, Bhuvaneswari Ramkumar <[EMAIL PROTECTED]> wrote:

> ok after that e-mail last night, I did try a make of the ports collection
> libnet
> after the make, everything looked fine, atleast I didnt notice anything
> missing in the log or config files but I still see the same problem, "
> undefined reference to libnet_init" and msgs liks that for every libnet
> call. I used -lnet too, but of no use, even did the changes in make file
> that mel had suggested in the previous post.
>
> So I dont know what the problem here is or if this is some incompatibility
> between how i have BSD and how I have libnet or probably they are not
> linking together or something like that.
>
> Otherwise I dont see why the compiler doesnt recognize any libnet function
> calls.
>
> Here is a question I have, I've worked in TinyOS before and I'm wondering
> if in Libnet we need a separate directory for each application with its own
> custom-written make file, or things can just be in one pool from where they
> are compiled. I do a simple cc -lnet filename.c compile.
> Is there something else I'm missing here ?
> Thanks
> Bhuvana
>
>
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Libnet in FreeBSD

2008-02-05 Thread Bhuvaneswari Ramkumar
ok after that e-mail last night, I did try a make of the ports collection
libnet
after the make, everything looked fine, atleast I didnt notice anything
missing in the log or config files but I still see the same problem, "
undefined reference to libnet_init" and msgs liks that for every libnet
call. I used -lnet too, but of no use, even did the changes in make file
that mel had suggested in the previous post.

So I dont know what the problem here is or if this is some incompatibility
between how i have BSD and how I have libnet or probably they are not
linking together or something like that.

Otherwise I dont see why the compiler doesnt recognize any libnet function
calls.

Here is a question I have, I've worked in TinyOS before and I'm wondering if
in Libnet we need a separate directory for each application with its own
custom-written make file, or things can just be in one pool from where they
are compiled. I do a simple cc -lnet filename.c compile.
Is there something else I'm missing here ?
Thanks
Bhuvana
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Libnet in FreeBSD

2008-02-05 Thread Gerard
On Mon, 4 Feb 2008 22:30:47 -0500
"Bhuvaneswari Ramkumar" <[EMAIL PROTECTED]> wrote:


> On Feb 4, 2008 2:41 PM, Mel <[EMAIL PROTECTED]>
> 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  > PROG=dns
> > LDADD=-lnet
> > LDFLAGS+=-L/usr/local/lib/libnet11
> >
> > .include 
> > 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
[EMAIL PROTECTED]

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



signature.asc
Description: PGP signature


Re: Libnet in FreeBSD

2008-02-04 Thread Bhuvaneswari Ramkumar
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.


Thanks
Bhuvana

On Feb 4, 2008 2:41 PM, Mel <[EMAIL PROTECTED]> 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  PROG=dns
> LDADD=-lnet
> LDFLAGS+=-L/usr/local/lib/libnet11
>
> .include 
> EOF
>
> then type make :)
> --
> Mel
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Libnet in FreeBSD

2008-02-04 Thread Mel
On Monday 04 February 2008 20:53:22 Bhuvaneswari Ramkumar wrote:
> 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 ?

Hmm, that goes into BSD's make system, so read up on it:
less /usr/share/mk/bsd.README
also:
gzcat /usr/share/doc/psd/12.pmake/paper.ascii.gz|less

These are more general C-programming topics though, not specific for FreeBSD. 
I just gave you a BSD make example, cause I knew that'll work out of the box, 
but you can use other systems, like the GNU autotools + gmake or jam.

I'd also look into the following:
man ports
man pkg_add

> Aside this, if someone could tell me the exact compilation steps for
> Libnet, it would be really helpful.

libnet11-config --help
-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Libnet in FreeBSD

2008-02-04 Thread Bhuvaneswari Ramkumar
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 <[EMAIL PROTECTED]> 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  PROG=dns
> LDADD=-lnet
> LDFLAGS+=-L/usr/local/lib/libnet11
>
> .include 
> EOF
>
> then type make :)
> --
> Mel
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Libnet in FreeBSD

2008-02-04 Thread Bhuvaneswari Ramkumar
:-) tried either ways , dosent work, I'm guessing it has to do with my make
itself

On Feb 4, 2008 2:39 PM, Ashish Shukla आशीष शुक्ल <[EMAIL PROTECTED]> wrote:

> > Bhuvaneswari Ramkumar writes:
>Bhuvaneswari> -Inet doesnt work :-(
>
> thats not '-Inet' but '-lnet' .
>
> HTH
> --
> Ashish Shukla आशीष शुक्ल
> http://wahjava.wordpress.com/
> ·-- ·-  ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
> freed.in | freedom in technology and software | 22-24 February 2008 |
> Delhi
> ··-· ·-· · · -·· ·-·-·- ·· -·   ··--- - - ---··
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Libnet in FreeBSD

2008-02-04 Thread Mel
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 

Re: Libnet in FreeBSD

2008-02-04 Thread Ashish Shukla आशीष श ुक्ल
> Bhuvaneswari Ramkumar writes:
Bhuvaneswari> -Inet doesnt work :-(

thats not '-Inet' but '-lnet' .

HTH
-- 
Ashish Shukla आशीष शुक्ल  http://wahjava.wordpress.com/
·-- ·-  ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
freed.in | freedom in technology and software | 22-24 February 2008 | Delhi
 ··-· ·-· · · -·· ·-·-·- ·· -·   ··--- - - ---··


pgpdZIAhB2gI1.pgp
Description: PGP signature


Re: Libnet in FreeBSD

2008-02-04 Thread Bhuvaneswari Ramkumar
-Inet doesnt work :-(

On Feb 4, 2008 2:23 PM, Ashish Shukla आशीष शुक्ल <[EMAIL PROTECTED]>
wrote:

> > Bhuvaneswari Ramkumar writes:
>Bhuvaneswari> well actually, even the sample applications seem to have
> the same problem,
>Bhuvaneswari> So I'm guessing its some installation issue:
>
>Bhuvaneswari> # cc dns.c
>Bhuvaneswari> /var/tmp//ccImyVt1.o(.text+0x88) : In function 'main' : :
> undefined
>Bhuvaneswari> reference to 'libnet_init'
>
> Probably you need to add '-lnet' to your command line to include
> libnet's libraries during linking.
>
> HTH
> --
> Ashish Shukla आशीष शुक्ल
> http://wahjava.wordpress.com/
> ·-- ·-  ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
> freed.in | freedom in technology and software | 22-24 February 2008 |
> Delhi
> ··-· ·-· · · -·· ·-·-·- ·· -·   ··--- - - ---··
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Re: Libnet in FreeBSD

2008-02-04 Thread Ashish Shukla आशीष शुक्ल
> Bhuvaneswari Ramkumar writes:
Bhuvaneswari> well actually, even the sample applications seem to have the 
same problem,
Bhuvaneswari> So I'm guessing its some installation issue:

Bhuvaneswari> # cc dns.c
Bhuvaneswari> /var/tmp//ccImyVt1.o(.text+0x88) : In function 'main' : : 
undefined
Bhuvaneswari> reference to 'libnet_init'

Probably you need to add '-lnet' to your command line to include
libnet's libraries during linking.

HTH
-- 
Ashish Shukla आशीष शुक्ल  http://wahjava.wordpress.com/
·-- ·-  ·--- ·- ···- ·- ·--·-· --· -- ·- ·· ·-·· ·-·-·- -·-· --- --
freed.in | freedom in technology and software | 22-24 February 2008 | Delhi
 ··-· ·-· · · -·· ·-·-·- ·· -·   ··--- - - ---··


pgprcDkYUNvNv.pgp
Description: PGP signature


Re: Libnet in FreeBSD

2008-02-04 Thread Bhuvaneswari Ramkumar
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.



On Feb 4, 2008 1:29 PM, Mel <[EMAIL PROTECTED]> wrote:

> On Monday 04 February 2008 18:54:49 Bhuvaneswari Ramkumar wrote:
>
> > I'm trying to work with Libnet in BSD, I ftped the package, did a
> > ./configure and a make install and things seemed to be fine.
> > But when I try to compile a simple application, I get a msg : "
> undefined
> > reference :libnet_init" , actually it looks like it doesnt recognize any
> of
> > the libnet functions calls. Am I missing something here ?  or is there
> > something else to be done about getting libnet to run here ?
>
> Could you show the entire compile line, you're likely to miss
> -L/usr/local,
> but there may be other things.
>
> Also helps to know what you use for you simple application: bsd's make
> with a
> Makefile, gmake with a Makefile or just type commands by hand.
>
> --
> Mel
> ___
> freebsd-questions@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-questions
> To unsubscribe, send any mail to "
> [EMAIL PROTECTED]"
>
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Re: Libnet in FreeBSD

2008-02-04 Thread Mel
On Monday 04 February 2008 18:54:49 Bhuvaneswari Ramkumar wrote:

> I'm trying to work with Libnet in BSD, I ftped the package, did a
> ./configure and a make install and things seemed to be fine.
> But when I try to compile a simple application, I get a msg : " undefined
> reference :libnet_init" , actually it looks like it doesnt recognize any of
> the libnet functions calls. Am I missing something here ?  or is there
> something else to be done about getting libnet to run here ?

Could you show the entire compile line, you're likely to miss -L/usr/local, 
but there may be other things.

Also helps to know what you use for you simple application: bsd's make with a 
Makefile, gmake with a Makefile or just type commands by hand.

-- 
Mel
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"


Libnet in FreeBSD

2008-02-04 Thread Bhuvaneswari Ramkumar
Hi,

I'm trying to work with Libnet in BSD, I ftped the package, did a
./configure and a make install and things seemed to be fine.
But when I try to compile a simple application, I get a msg : " undefined
reference :libnet_init" , actually it looks like it doesnt recognize any of
the libnet functions calls. Am I missing something here ?  or is there
something else to be done about getting libnet to run here ?

Thanks
Bhuvana
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"