1. check your include path 2. check your lib path 3. use -lm If problem exists: 1. explicitly set your include your -I option 2. set your lib path using -L option(not sure)
On Wed, Jan 13, 2010 at 11:12, ankur <[email protected]> wrote: > hi all. i am using the the gcc version 4.2.4 (Debian 4.2.4-1). i am > including the library math.h in a C code so as to use the sqrt() > function. on compilation of the program, it is showing the following > error: > > undefined reference to sqrt > > i tried to look up the man pages by the command "man 3 sqrt" and it is > giving the message > > No manual entry for sqrt in section 3 > > please help me to be able to use the library functions in my program > > -- > l...@iitd - http://tinyurl.com/ycueutm > > -- Lots o' Luv, Phani Bhushan Let not your sense of morals prevent you from doing what is right - Isaac Asimov (Salvor Hardin in Foundation and Empire) Please avoid sending me Word or PowerPoint attachments. See http://www.gnu.org/philosophy/no-word-attachments.html
-- l...@iitd - http://tinyurl.com/ycueutm
