www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/04/06/03:34:55

Date: Tue, 6 Apr 1999 09:32:52 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Chris Hut <chut AT wesleyan DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: help w/ STL random_shuffle function (lrand48() undefined)
In-Reply-To: <7ebgcd$k3t@news.wesleyan.edu>
Message-ID: <Pine.SUN.3.91.990406093059.6187J-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 5 Apr 1999, Chris Hut wrote:

> This seems like a faq type thing, but I checked and haven't seen this
> problem listed anywhere...

The FAQ only includes FREQUENTLY-asked questions.  You should also
search the DJGPP mail archives
(http://www.delorie.com/djgpp/mail-archives/), as the FAQ says.  This
isssue popped up a couple of times before.

> when compiling I get this error:
> c:/djgpp/lang/cxx/stl_algo.h: In function 'void __random_shuffle<int *,
> int>(int *, int *, int *)':
> c:/djgpp/lang/cxx/stl_algo.h:617: 'lrand48' undeclared (first use this
> function)
> (stuff about each undeclared identifier only reported once)

This is a bug in libstdcxx: it doesn't define the symbol that tells
the rest of the code DJGPP doesn't have the rand48 family of
functions.

To solve this problem, edit the file lang/cxx/stl_config.h and add the 
following snippet to it:

#ifdef __DJGPP__
# define __STL_NO_DRAND48
#endif

After that, your program should compile and link without this problem.

- Raw text -


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