Subject:
|
Re: random() compile problems
|
Newsgroups:
|
lugnet.robotics.rcx.legos
|
Date:
|
Tue, 21 Dec 1999 02:46:07 GMT
|
Viewed:
|
1375 times
|
| |
| |
Matthew Drayton wrote:
>
> Hi all,
> We are having troubles compiling code that makes use of the random()
> (and
> srandom()). The error messages that occour when we compile are:
> undefined reference to '_srandom'
> undefined reference to '_random'
Hi Matthew, it lokks like the functions are simply not defined neither
in the legOS kernel nor in the libs. Following the comment in
include/stdlib.h, they should be in libiberty.a, which is somewhere in
the cross-compiler tree. However, searching through the librarys found
there with nm, i found nothing like random. i´d bet, Markus has an
enhanced libiberty that has it. BTW, the legOS kernel itself uses
sys_time to provide some randomness, look at the very end of
lnp_logical_write(), where a random value is needed when computing
allow_tx after a collision.
cheers, Martin
|
|
Message has 1 Reply: | | Re: random() compile problems
|
| (...) Yes, it looks like random is in a private library of mine, sorry. With all the exciting networking development happening, count on 0.2.4 being released soon, it will contain random() again. (...) For small amounts of random numbers, you may (...) (25 years ago, 21-Dec-99, to lugnet.robotics.rcx.legos)
|
Message is in Reply To:
| | random() compile problems
|
| Hi all, We are having troubles compiling code that makes use of the random() (and srandom()). The error messages that occour when we compile are: undefined reference to '_srandom' undefined reference to '_random' Any help will be greatly (...) (25 years ago, 20-Dec-99, to lugnet.robotics.rcx.legos)
|
3 Messages in This Thread:
- Entire Thread on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
This Message and its Replies on One Page:
- Nested:
All | Brief | Compact | Dots
Linear:
All | Brief | Compact
|
|
|
|