This is the mail archive of the
cygwin@sourceware.cygnus.com
mailing list for the Cygwin project.
Re: random(), srandom()
- To: Andrew Neiderer <neiderer at arl dot mil>
- Subject: Re: random(), srandom()
- From: Derek Karnes <dkarnes at mystech dot com>
- Date: Fri, 16 Jan 1998 09:59:04 -0500
- CC: gnu-win32 at cygnus dot com
- Organization: Mystech Associates, Inc.
- References: <9801130530.aa23801@soldist.arl.mil>
Stick these two lines in one of your included header files:
#define random rand
#define srandom srand
and this in the file where the functions are being used:
#include <stdlib.h>
which is \gnuwin32\b18\H-i386-cygwin32\i386-cygwin32\include\stdlib.h (which
has rand() and srand())
Should work.
-D
Andrew Neiderer wrote:
> I have an OpenGL program that uses srandom(), random()
> for fractal terrain generation. I thought the prototypes
> would be in H-i386-cygwin32/i386-cygwin32/include/math.h
> but they are not. Does anyone know how to handle the
> errors "undefined references ..." to these 2 routines when
> I try to generate the executeable. Thanks.
>
> - Andy Neiderer
> neiderer@arl.mil
--
--------------------------------
-- Derek L. Karnes --
-- dkarnes@mystech.com --
-- http://www.erols.com/terek --
--------------------------------
-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".