Bug 77415 - math.h compile problem + 7.2
math.h compile problem + 7.2
Status: CLOSED NOTABUG
Product: Red Hat Linux
Classification: Retired
Component: gcc (Show other bugs)
7.2
i586 Linux
medium Severity medium
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2002-11-06 13:47 EST by Dan Bishop
Modified: 2007-04-18 12:48 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2002-11-06 13:47:52 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Dan Bishop 2002-11-06 13:47:45 EST
From Bugzilla Helper:
User-Agent: Mozilla/4.0 (compatible; MSIE 5.5; Windows NT 5.0)

Description of problem:
Hello,
 I have been compiling a C program using the "gcc" available in this 
 version. I am trying to use the "log10" function normally part of the math.h 
library. The compiler does not balk at the "#include " line however it fails to 
recognize the function. The same was true of other math.h functions (exp and 
log). My compile command line is "gcc filename.c -o output_file". Is there a 
bug fix that I need for the libraries or something missing? Thanks.

Version-Release number of selected component (if applicable):


How reproducible:
Always

Steps to Reproduce:
1. Create filename.c file with "#include <math.h>" and use log10 or log or exp 
function in the file (could be in main).
2.Attempt to compile "gcc filename.c -o target_name"
3.
	

Actual Results:  If you don't use any math functions the library will load, but 
if you try to use "log10" or "log" or "exp" (and probably all the other math.h 
functions) it can't find them, even though it seems to find the library.

Expected Results:  Since library is loaded it should recognize these standard C 
functions.

Additional info:
Comment 1 Jakub Jelinek 2002-11-06 13:51:34 EST
You need to add -lm to the command line.

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