On Friday 08 April 2005 22:18, Hallingstad Håkon wrote:
Add -lm when compiling Thanks Håkon, it worked, but I didn't know that I had to specifically link with libm.a I am used to the maths libraries being part of the standard search. Regards, Colin
Regards, Håkon Hallingstad Software Developer, EDB +47 2252 8218 hakon.hallingstad@edb.com www.edb.com "IT er ikke alt - men det hjelper"
-----Original Message----- From: Colin Carter [mailto:colincarter@exemail.com.au] Sent: 8. april 2005 14:11 To: suse-programming-e@suse.com Subject: [suse-programming-e] math.h
Hi, I have just moved into Linux and compiled, linked and executed a simple C program with X Window. This required standard #include <...> But when I tried to use sqrt() I added #include
but x = sqrt ( x ); gives me 'undefined reference 'sqrt' Any ideas? Regards, Colin
-- To unsubscribe, email: suse-programming-e-unsubscribe@suse.com For additional commands, email: suse-programming-e-help@suse.com Archives can be found at: http://lists.suse.com/archive/suse-programming-e