Re: sqrt(x)

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

 



tobaccofarm wrote:
However the compiler gave the following error messages:

sqrt.c:15:2: warning: no newline at end of file
/tmp/ccCL96r1.o(.text+0x4d): In function `main':
sqrt.c: undefined reference to `pow'
/tmp/ccCL96r1.o(.text+0x80):sqrt.c: undefined reference to `sqrt'
/tmp/ccCL96r1.o(.text+0xc0):sqrt.c: undefined reference to `pow'
collect2: ld returned 1 exit status

No, it was the linker. No, you are on the wrong list. Yes, try out -lm, then it should work.

Wolfgang

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux