Re: gcc questions

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

 



On Sat, Nov 26, 2005 at 11:47:43PM +0200, Dotan Cohen wrote:
> [dotancohen@localhost מדעי המחשב]$ gcc 1_3.c
> /tmp/cc0PB7X5.o(.text+0x18b): In function `main':
> 1_3.c: undefined reference to `sqrt'
> collect2: ld returned 1 exit status
> [dotancohen@localhost מדעי המחשב]$

You need to link in the maths library, "m":

gcc -lm 1_3.c


-- 
Little fly, thy summer's play my thoughtless hand
has terminated with extreme prejudice.
        (with apologies to William Blake)


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux