Article View: gnu.gcc.help
Article #42191Re: sqrt() and pow() not recognized
From: David Malone
Date: Wed, 27 Dec 1995 00:00
Date: Wed, 27 Dec 1995 00:00
15 lines
952 bytes
952 bytes
arm@helix.nih.gov (Andrew_R._Mitz) writes: >doing the same mistake on both. When I compile a short >c program that uses either sqrt() or pow(), I get this >error message: >... undefined symbol _sqrt referenced from text segment. >I have included math.h. I get a different error if I >use the wrong number of parameters in the functions. You should include the maths library, by saying -lm , the math.h only includes the declarations of the functions, not the functions themselves. David.
Technical Details
Message-ID:
<4bq343$o74@hamilton.maths.tcd.ie>Path:
arc1-ca.pugleaf.net!unknown!not-for-mailReferences:
<1995Dec26.205032.15172@alw.nih.gov>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,97d7d17902cfc548 X-Google-Attributes: gid11318c,public From: dwmalone@maths.tcd.ie (David Malone) Subject: Re: sqrt() and pow() not recognized Date: 1995/12/27 Message-ID: <4bq343$o74@hamilton.maths.tcd.ie> X-Deja-AN: 122884967 references: <1995Dec26.205032.15172@alw.nih.gov> organization: Dept. of Maths, Trinity College, Dublin, Ireland. newsgroups: gnu.gcc.help