From mboxrd@z Thu Jan 1 00:00:00 1970 From: haha@here.org To: help-gcc@gnu.org Subject: Re: math.h prob Date: Wed, 03 Nov 1999 08:28:00 -0000 Message-id: <7vplrh$18d$1@oravannahka.helsinki.fi> References: <38204719.FD2DC371@clinmed.gla.ac.uk> X-SW-Source: 1999-11/msg00013.html :>I am fairly new to C programming, especially to using gcc, so I am sorry :>if my question is a bit simple! :>and try to compile it using, :>gcc -o test mattest.c :>I get the following error: :>Undefined first referenced :> symbol in file :>sqrt /var/tmp/cc9Eay_r1.o You need to link the math library to your program with the -lm option. I recommend you don't call your program 'test', since this is a command: gcc -o math_test mattest.c -lm Haha! From mboxrd@z Thu Jan 1 00:00:00 1970 From: haha@here.org To: help-gcc@gnu.org Subject: Re: math.h prob Date: Tue, 30 Nov 1999 23:28:00 -0000 Message-ID: <7vplrh$18d$1@oravannahka.helsinki.fi> References: <38204719.FD2DC371@clinmed.gla.ac.uk> X-SW-Source: 1999-11n/msg00012.html Message-ID: <19991130232800.HmfSFVoGwUcfa_deTZ10H4TLLcpGQmWjQqC0057ZJOU@z> :>I am fairly new to C programming, especially to using gcc, so I am sorry :>if my question is a bit simple! :>and try to compile it using, :>gcc -o test mattest.c :>I get the following error: :>Undefined first referenced :> symbol in file :>sqrt /var/tmp/cc9Eay_r1.o You need to link the math library to your program with the -lm option. I recommend you don't call your program 'test', since this is a command: gcc -o math_test mattest.c -lm Haha!