From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joachim Bauernberger To: help-gcc@gnu.org Subject: Re: howto sqrt? Date: Tue, 07 Dec 1999 07:34:00 -0000 Message-id: <384D289B.62CCAB91@singnet.com.sg> References: <384CD454.A7C437C@singnet.com.sg> <82ikm6$okv$1@oravannahka.helsinki.fi> X-SW-Source: 1999-12/msg00102.html haha@here.org wrote: > Joachim Bauernberger wrote: > > :>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? > > Yes. You haven't read the FAQ which answers your question which has been > asked and answered frequently. > > :>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' > > You just need one more option: -lm, which links in the math-library. > This library defines sqrt(), pow() and many other mathematical functions. > Haha! no you're right i havn't read the faq. thank's for pointing things out. joachim! From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joachim Bauernberger To: help-gcc@gnu.org Subject: Re: howto sqrt? Date: Fri, 31 Dec 1999 22:24:00 -0000 Message-ID: <384D289B.62CCAB91@singnet.com.sg> References: <384CD454.A7C437C@singnet.com.sg> <82ikm6$okv$1@oravannahka.helsinki.fi> X-SW-Source: 1999-12n/msg00102.html Message-ID: <19991231222400.fn12-IYTOwdGJqbPxntTG05m1zGMMaan_3WmBIfPV2o@z> haha@here.org wrote: > Joachim Bauernberger wrote: > > :>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? > > Yes. You haven't read the FAQ which answers your question which has been > asked and answered frequently. > > :>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' > > You just need one more option: -lm, which links in the math-library. > This library defines sqrt(), pow() and many other mathematical functions. > Haha! no you're right i havn't read the faq. thank's for pointing things out. joachim!