Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 77415 - math.h compile problem + 7.2
Summary: math.h compile problem + 7.2
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: gcc
Version: 7.2
Hardware: i586
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Jakub Jelinek
QA Contact: Brian Brock
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2002-11-06 18:47 UTC by Dan Bishop
Modified: 2007-04-18 16:48 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2002-11-06 18:47:52 UTC


Attachments (Terms of Use)

Description Dan Bishop 2002-11-06 18:47:45 UTC
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 18:51:34 UTC
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.