Date: Tue, 6 Apr 1999 09:32:52 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Chris Hut 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Reply-To: djgpp AT delorie DOT com X-Mailing-List: djgpp AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk 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 *)': > 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.