Mail Archives: djgpp/1996/06/06/12:16:17
Thinking furiously, MISTRY CHETAN wrote:
>
> I have a program which uses a few math functions from the include file,
> and I have the line "#include <math.h>" in my code, and I compile it with
> the command "gcc -lm progname.c" ; but I still get an error message
> something like undefined reference to "pow" (the function I'm using).
>
Try changing:
gcc -lm progname.c
to:
gcc progname.c -lm
BTW, a 15-line signature is WAY too big. For courtesy and following
internet suggested standards, you really ought to cut it down a bit.
(Of course, if you want to get picky, mine is too big, too! :-)
Fred
--
-------------------------------------------------------------------------------
.---- Fred Smith / Office: fred AT computrition DOT com
( /__ ,__. __ __ / __ : / 508-663-2524
/ / / /__) / / /__) .+' Home: fredex AT fcshome DOT stoneham DOT ma DOT us
/ / (__ (___ (__(_ (___ / :__ 617-438-5471
-------------------------------- Jude 1:24,25 ---------------------------------
- Raw text -