From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joachim Bauernberger To: help-gcc@gnu.org Subject: howto sqrt? Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <384CD454.A7C437C@singnet.com.sg> X-SW-Source: 1999-12n/msg00099.html Message-ID: <19991231222400.AxTNq4QLUHMaI2z7uBoXwDLSBgeUnl8QxPQL4bcuV7A@z> hi! i'm pretty new using the gcc. most of my programming sofar has been under windoze 8-( using the borland tools. unfortunatly i am not able to use the sqrt or pow function. can anybody tell me what i'm doing wrong here? if i compile the following c program using the compiler options: gcc -g -D_GNU_SOURCE -Wall filename.c -o outputfile i get these errors: undefined reference to 'sqrt' my simple test program looks like this: #include #include int main () { double x = 900; printf("\nSquare root of x = %f\n", sqrt(x)); return 0; } and it's the same with pow: double x = 5, y; y = pow(x,2); printf("\n%g\n",y); gives me undefined reference to pow?????? i'm sorry for boring you with newbie stuff like that. i'd really appreaciate if anybody could help me out..... thank's joachim!