At 03:18 PM 4/5/2001, Latyr Jean-Luc FAYE wrote: > > Don't place -lm at the beginning of the command line. Place it at the >end. > > >Thanks folks it works. >A few more questions on this behaviour. >I'm a Cygwin's newbie (3 days now) and I would like to know what was wrong. >I mean why >gcc -otest.exe file.c is OK >gcc -otest.exe file.c -lm is OK >gcc -lm -otest.exe file.c -lm is NOT OK > >I am more surprised by the fact that >gcc -otest.exe file.c is OK because I am using math.h in file.c and I learnt >at school that when I use math.h I should put -lm in the compilation line You want to check out the documentation for gcc (via info, man, or look on the web) to understand the flag ordering. Cygwin has one library to implement everything. Therefore, you don't need -lm, although libm.a should be linked to libcygwin.a to make this work if your flag ordering is right. Larry Hall [EMAIL PROTECTED] RFK Partners, Inc. http://www.rfk.com 118 Washington Street (508) 893-9779 - RFK Office Holliston, MA 01746 (508) 893-9889 - FAX -- Want to unsubscribe from this list? Check out: http://cygwin.com/ml/#unsubscribe-simple
Re: Rep: Re: Compiling with Borland C but not with Cygwin !!!
Larry Hall (RFK Partners, Inc) Thu, 05 Apr 2001 12:37:07 -0700
- Compiling with Borland C but not with Cygwi... Latyr Jean-Luc FAYE
- Re: Compiling with Borland C but not w... Larry Hall (RFK Partners, Inc)
- RE: Compiling with Borland C but not w... Patrick Doyle
- Rep: Re: Compiling with Borland C ... Latyr Jean-Luc FAYE
- Re: Rep: Re: Compiling with Bo... Larry Hall (RFK Partners, Inc)
- Re: Rep: Re: Compiling wit... Larry Hall (RFK Partners, Inc)
- Re: Rep: Re: Compiling with Bo... Dmitrii Pasechnik
- RE: Re: Compiling with Borland C but n... Schaible, Joerg