From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maurizio Loreti To: help-gcc@gnu.org Subject: Re: math.h Date: Sun, 31 Oct 1999 13:57:00 -0000 Message-ID: References: <380D58F1.B400EF83@primenet.com> X-SW-Source: 1999-10n/msg00328.html Message-ID: <19991031135700.f-WDc2rFU6gC4gTep4aC0VFy55mDmPffCKBZaBwn3Oo@z> "Dennis J. Sylvester" writes: > I tried using the sqrt() function with gcc and get an error : undefined > reference to 'sqrt'. Did you link the math library? I mean, did you type "-lm", like in gcc -ansi -pedantic -Wall -o foo foo.c -lm ?` -- Maurizio Loreti http://www.pd.infn.it/~loreti/mlo.html Univ. of Padova, Dept. of Physics - Padova, Italy loreti@pd.infn.it