On Wed, Jan 13, 2010 at 10:11 PM, ankur kumar <[email protected]> wrote: > > > On Wed, Jan 13, 2010 at 6:09 PM, ankur kumar <[email protected]> wrote: >> >> >> On Wed, Jan 13, 2010 at 3:25 AM, kumar anurag <[email protected]> >> wrote: >>> >>> yeah dude use >>> cc -lm pgm.c >>> it links to math.h >>> it will compile >>> >>> On Wed, Jan 13, 2010 at 11:19 AM, Phani Bhushan Tholeti >>> <[email protected]> wrote: >>>> >>>> 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 >>>> >>> >>> >>> >>> -- >>> c u soon >>> >>> -- >>> l...@iitd - http://tinyurl.com/ycueutm >>> >> Hey thanks for the help! it worked >> :) >> >> >> -- >> Ankur > > hey, the error messages are eliminated by the support you people gave but > there are certain similar warning messages. my point is can't we eliminate > the warning messages too? there are messages like "undefined reference to > exit ". although the code is running fine. > > -- > Ankur
Can you paste code and compilation warning ?? aha,,,,,,,,,, just wait -- use http://pastie.org , -- ┌─────────────────────────┐ │ Narendra Sisodiya ( नरेन्द्र सिसोदिया ) │ Society for Knowledge Commons │ Web : http://narendra.techfandu.org └─────────────────────────┘
-- l...@iitd - http://tinyurl.com/ycueutm
