This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Rep: Re: Compiling with Borland C but not with Cygwin !!!
- To: "Cygwin" <cygwin at cygwin dot com>
- Subject: Rep: Re: Compiling with Borland C but not with Cygwin !!!
- From: "Latyr Jean-Luc FAYE" <Latyr dot Faye2 at mail dot dcu dot ie>
- Date: Thu, 5 Apr 2001 20:18:39 +0100
- Organization: Dublin City University
- References: <NFBBJAJICAKJPMMKDAGBEENPCBAA.wpd@delcomsys.com>
- Reply-To: "Latyr Jean-Luc FAYE" <webmaster at faye dot cjb dot net>
> 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
Regards
Jean-Luc
---
Latyr Jean-Luc FAYE
http://faye.cjb.net
--
Want to unsubscribe from this list?
Check out: http://cygwin.com/ml/#unsubscribe-simple