Mail Archives: djgpp/1995/02/08/08:31:21
> lh-dice.c(.text+0x12c): undefined reference to `srand48'
> lh-dice.c(.text+0x141): undefined reference to `lrand48'
> lh-dice.c(.text+0x18f): undefined reference to `lrand48'
> lh-dice.c(.text+0x23a): undefined reference to `lrand48'
> lh-dice.c(.text+0x24e): undefined reference to `lrand48'
> lh-dice.c(.text+0x2bf): undefined reference to `lrand48'
> lh-dice.c(.text+0x329): more undefined references to `lrand48' follow
> make.exe: *** [lh] Error 1
>
> lh-dice.c is a generic "dice roller" module that uses srand48 to initialize
> the random number generator and lrand48 to generate the random numbers it
> turns into dice rolls. It includes <stdlib.h> up front, and in looking
> through the supplied (djgpp) stdlib.h, I find it includes djgppstd.h, which
> contains the indicated function declarations.
>
> What's wrong?
Yes, that's right: the rand48() family is NOT in the library.
You can verify this with nm. Anybody knows where it can be
found? glibc maybe? (although that will make your program
to be LGPL...)
- Raw text -