ftp.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/02/08/08:31:21

To: Mark Hull-Richter <mhr AT sparc DOT sandiegoca DOT attgis DOT com>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: Problems with (first compile under) djgpp/gcc
Date: Wed, 08 Feb 95 12:27:03 +0200
From: "Eli Zaretskii" <eliz AT is DOT elta DOT co DOT il>

> 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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019