Bug 9170 - Compiling fails with math.h
Compiling fails with math.h
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Cristian Gafton
Depends On:
  Show dependency treegraph
Reported: 2000-02-06 18:28 EST by vinctisc
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2000-02-07 06:03:25 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description vinctisc 2000-02-06 18:28:01 EST
I have tried to compile, for example, this simple program:

#include <math.h>
main ()

The compiler tells me this message: "undefined reference to 'sqrt'
Comment 1 Nalin Dahyabhai 2000-02-07 06:03:59 EST
The sqrt() function is implemented in libm.  Try adding "-lm" to the end of your
command for compiling your program.

Note You need to log in before you can comment on or make changes to this bug.