| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com> |
| List-Archive: | <http://sourceware.cygnus.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT sourceware DOT cygnus DOT com> |
| List-Help: | <mailto:cygwin-help AT sourceware DOT cygnus DOT com>, <http://sourceware.cygnus.com/ml/#faqs> |
| Sender: | cygwin-owner AT sourceware DOT cygnus DOT com |
| Delivered-To: | mailing list cygwin AT sourceware DOT cygnus DOT com |
| Message-ID: | <005e01bf7a0e$ddeef8a0$9801010a@gpsr.colostate.edu> |
| From: | "John Huddleston" <jhuddles AT rocky DOT itc DOT nrcs DOT usda DOT gov> |
| To: | "Ian Miller" <ian AT gingerspice DOT demon DOT co DOT uk>, |
| "Cygwin Mailing List" <cygwin AT sourceware DOT cygnus DOT com> | |
| References: | <38ACC09C DOT EF5F1659 AT gingerspice DOT demon DOT co DOT uk> |
| Subject: | Re: srand48 in B20. |
| Date: | Fri, 18 Feb 2000 05:51:24 -0700 |
| Organization: | nrcs |
| MIME-Version: | 1.0 |
| X-Priority: | 3 |
| X-MSMail-Priority: | Normal |
| X-Mailer: | Microsoft Outlook Express 5.00.2314.1300 |
| X-MimeOLE: | Produced By Microsoft MimeOLE V5.00.2314.1300 |
I ran into this problem when compiling the GRASS5 source code. Here was my solution #ifdef __CYGWIN__ #define lrand48() rand()/32767.0 #define srand48(sv) (srand((unsigned)(sv))) #else extern long lrand48(); extern void srand48(); #endif John Huddleston ----- Original Message ----- From: Ian Miller <ian AT gingerspice DOT demon DOT co DOT uk> To: Cygwin Mailing List <cygwin AT sourceware DOT cygnus DOT com> Sent: Thursday, February 17, 2000 8:46 PM Subject: srand48 in B20. > > Hi, I'm having a problem with the first (!) program I've tried to compile > under cygwin - I'm hoping it's something simple that you'll all be able to > spot right away from this linker output? > > I've had a hunt around in the include headers, and I can't seem to find one > that actually has srand48 or lrand48 in it... it should be in <stdlib.h> > shouldn't it? > > --- begin linker errors --- > > gcc -o 1BC error.o input_output.o gestion.o eval.o search.o write.o bayes.o 1BC. > o -lm > eval.o(.text+0x23):eval.c: undefined reference to `lrand48' > search.o(.text+0x42a8):search.c: undefined reference to `srand48' > collect2: ld returned 1 exit status > make: *** [1BC] Error 1 > > --- end linker errors --- > > cheers, > ian > > -- > +------------------------------+-------------------------------------------- --+ > | ian miller | My other MUA is a GNU. | > | ian AT gingerspice DOT demon DOT co DOT uk | http://www.gingerspice.demon.co.uk | > +------------------------------+-------------------------------------------- --+ > > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |