Bug 9170 - Compiling fails with math.h
Summary: Compiling fails with math.h
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc   
(Show other bugs)
Version: 6.0
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Cristian Gafton
QA Contact:
URL:
Whiteboard:
Keywords:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2000-02-06 23:28 UTC by vinctisc
Modified: 2008-05-01 15:37 UTC (History)
0 users

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


Attachments (Terms of Use)

Description vinctisc 2000-02-06 23:28:01 UTC
I have tried to compile, for example, this simple program:

#include <math.h>
main ()
{
      sqrt(10)
}

The compiler tells me this message: "undefined reference to 'sqrt'

Comment 1 Nalin Dahyabhai 2000-02-07 11:03:59 UTC
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.