To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.legosOpen lugnet.robotics.rcx.legos in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / legOS / 1086
1085  |  1087
Subject: 
Re: random
Newsgroups: 
lugnet.robotics.rcx.legos
Date: 
Mon, 22 May 2000 19:39:22 GMT
Viewed: 
1366 times
  
What version are you using? I believe random/srandom are broken in all
non-CVS versions of legOS. To get the CVS version, head to
http://legOS.sourceforge.net and follow the instructions on that page.
Should work fine- I just tested the new random() two hours ago and it
worked well.
Luis

On Mon, 22 May 2000, Tobias Bende wrote:

Date: Mon, 22 May 2000 18:46:54 GMT
From: Tobias Bende <f96tobe@dd.chalmers.se>
To: lugnet.robotics.rcx.legos@lugnet.com
Subject: random

Hi!

Back again with more problems. I want to use random() in my programs and
looking in stdlib.h it looks like it is implemented. It says:

extern long int random(void);
extern void srandom(unsigned int seed);

When I didn't have stdlib.h included, I got a warning for "implicit
declaration of function", which is of course natural. When stdlib.h was
included, I still got these error lines (which also appeared before):

rand0.o(.text+0xe):rand0.c: undefined reference to `_srandom'
rand0.o(.text+0x12):rand0.c: undefined reference to `_random'
rand0.o(.text+0xe):rand0.c: undefined reference to `_srandom'
rand0.o(.text+0x12):rand0.c: undefined reference to `_random'
rand0.o(.text+0xe):rand0.c: undefined reference to `_srandom'
rand0.o(.text+0x12):rand0.c: undefined reference to `_random'
make: *** [rand0.ds1] Error 1


Of course, I can write my own random generator, but if I have access to
random(), I would prefer it. Does anyone know what can be wrong?

Regards
Tobias



-----------------------------------------------------------------------

           "Going to California with an aching in my heart.
               Someone told me there's a girl out there
            with love in her eyes and flowers in her hair."
-Led Zeppelin, "Going to California"

-----------------------------------------------------------------------



Message is in Reply To:
  random
 
Hi! Back again with more problems. I want to use random() in my programs and looking in stdlib.h it looks like it is implemented. It says: extern long int random(void); extern void srandom(unsigned int seed); When I didn't have stdlib.h included, I (...) (24 years ago, 22-May-00, to lugnet.robotics.rcx.legos)

3 Messages in This Thread:

Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR