No pow()?

This is a discussion on No pow()? within the C Programming forums, part of the General Programming Boards category; I thought the pow() function in math.h was a given. But I'm surprised the compiler doesn't recognize it in my ...

  1. #1
    Registered User
    Join Date
    May 2006
    Posts
    57

    No pow()?

    I thought the pow() function in math.h was a given. But I'm surprised the compiler doesn't recognize it in my program even though I included the math.h library.

    I'm using gcc in Mandrake Linux. Has anyone else had this problem?

  2. #2
    Just Lurking Dave_Sinkula's Avatar
    Join Date
    Oct 2002
    Posts
    5,006
    Did you link with the library (-lm [dash ell em])?

    Learn to distinguish complier and linker errors.
    7. It is easier to write an incorrect program than understand a correct one.
    40. There are two ways to write error-free programs; only the third one works.*

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. What's the difference between pow() vs shift?
    By Overworked_PhD in forum C Programming
    Replies: 9
    Last Post: 01-06-2008, 12:04 PM
  2. Help with pow()
    By jedi_jinn in forum C Programming
    Replies: 7
    Last Post: 10-09-2006, 02:17 AM
  3. trying to use pow()
    By Mikecore in forum C Programming
    Replies: 9
    Last Post: 10-09-2005, 06:30 PM
  4. pow function returns wrong value
    By ckbales in forum C Programming
    Replies: 5
    Last Post: 02-01-2003, 08:46 PM
  5. Problem with pow()
    By RMacFly in forum C Programming
    Replies: 4
    Last Post: 09-18-2001, 11:54 AM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21