On Thu, Jan 14, 2010 at 11:38 PM, ankur kumar <[email protected]> wrote: > > > On Wed, Jan 13, 2010 at 3:08 PM, narendra sisodiya > <[email protected]> wrote: >> >> 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 >> > > I pasted the code and the warning there. > the link is http://pastie.org/778318
http://pastie.org/778468 PS: never ignore warning. always try to code with zero warnings. Also when ever you got error. copypaste and search on google , as i found answer via quick search. -- ┌─────────────────────────┐ │ Narendra Sisodiya ( नरेन्द्र सिसोदिया ) │ Society for Knowledge Commons │ Web : http://narendra.techfandu.org └─────────────────────────┘
-- l...@iitd - http://tinyurl.com/ycueutm
