Boston Linux & Unix (BLU) Home | Calendar | Mail Lists | List Archives | Desktop SIG | Hardware Hacking SIG
Wiki | Flickr | PicasaWeb | Video | Maps & Directions | Installfests | Keysignings
Linux Cafe | Meeting Notes | Blog | Linux Links | Bling | About BLU

BLU Discuss list archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

gcc math.h won't include



On 27 Feb 98 at 13:40, Mark Glassberg wrote:

> I'm running linux on a 486 based pc, and trying to teach myself C.  A program
> in a book I'm studying has the "#include <math.h>" line but gcc give an error
> that it doesn't understand the term "pow", which is supposed to be defined in
> the included file.  Does anyone have an idea what's causing this problem?
Math.h does include the function prototypes for the pow function. You 
do not provide enough information. Is it complaining about math.h, or 
your use of the pow function in your program, of is it a linker 
message where it is saying that you have an unidentified reference. 
When you compile, you need to use the -lm command line flag, which 
causes the math library (eg. libm.so) to be included by the linker. 
Gerald A. Feldman <gaf at corsof.com>
home:gaf at mediaone.net




BLU is a member of BostonUserGroups
BLU is a member of BostonUserGroups
We also thank MIT for the use of their facilities.

Valid HTML 4.01! Valid CSS!



Boston Linux & Unix / webmaster@blu.org