From: "A. Sinan Unur" Newsgroups: comp.os.msdos.djgpp Subject: Re: using "srandom" and "random" in RSXNTDJ Date: Thu, 27 Nov 1997 07:03:49 -0500 Organization: Cornell University http://www.cornell.edu Lines: 39 Sender: asu1 AT cornell DOT edu (Verified) Message-ID: <347D61A5.C00D64E8@cornell.edu> References: <01bcfab0$72645f60$393e63c3 AT mrbcomp> Reply-To: asu1 AT cornell DOT edu NNTP-Posting-Host: cu-dialup-0035.cit.cornell.edu Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Precedence: bulk Matthew Bennett wrote: > > Hi, > > This problem is getting annoying now - I can't seem to use srandom or > random in rsxntdj, or whenever I compile programs with the -Zwin32 > option :( > > In rsxntdj, though the commands are recognised and no compiler errors > are given, they cause my program to quit and win95 to display an > error message: of course no errors are given because you are using the ld.exe that came with the rsxntdj package which does not give errors for undefined references to be able to deal with dll's. i don't know whether that is the best way, but that is the way they chose to cope with the dll's. in any case, i do not think there is any function called random in any standard windows dll (remember, random is not ansi.) > I need to use the more advanced srandom and random commands (even > though the srand and rand functions work ok) > How can I use these functions in rsxntdj? It is something as simple as > including another library etc? i guess you could always add the source of random to your project. > Computers do what you *tell* them to do, not what you *want* them to > do. worth repeating. -- ---------------------------------------------------------------------- A. Sinan Unur Department of Policy Analysis and Management, College of Human Ecology, Cornell University, Ithaca, NY 14853, USA mailto:sinan DOT unur AT cornell DOT edu http://www.people.cornell.edu/pages/asu1/