Re: gcc questions

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

 



On 11/27/05, Dave Mitchell <davem@xxxxxxxxx> wrote:
> 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
>
>

Thank you, it compiled now. I just spacebar'ed about 100 times in the
gcc man page looking for the "m" option that you mention. I did find
the "l" option (search the library named library when linking), but
not the "m" option.

Dotan Cohen
http://technology-sleuth.com/short_answer/what_is_a_cellphone.html


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

  Powered by Linux