Re: weird C problem [SOLVED]

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

 



On Wednesday August 11 2010 19:39:55 Ralf Corsepius wrote:
> On 08/11/2010 06:31 PM, Dj YB wrote:

> > $ cc a.c
> > /tmp/ccTaon4H.o: In function `main':
> > a.c:(.text+0x3e): undefined reference to `sqrt'
> > 
> > to be sure I checked man sqrt:
> > 
> > SYNOPSIS
> > 
> > #include<math.h>
> > 
> > double sqrt(double x);
> 
> A couple of lines later you will find this sentence:
> "       Link with -lm."
> 
> Math functions are not contained in libc, they are in a separate library
> called libm.
> 
> => cc a.c -lm
> 
> Ralf

Thanks Ralf!
I knew there must be something really basic I am missing.

Regards,
YB.
-- 
users mailing list
users@xxxxxxxxxxxxxxxxxxxxxxx
To unsubscribe or change subscription options:
https://admin.fedoraproject.org/mailman/listinfo/users
Guidelines: http://fedoraproject.org/wiki/Mailing_list_guidelines

[Index of Archives]     [Older Fedora Users]     [Fedora Announce]     [Fedora Package Announce]     [EPEL Announce]     [EPEL Devel]     [Fedora Magazine]     [Fedora Summer Coding]     [Fedora Laptop]     [Fedora Cloud]     [Fedora Advisory Board]     [Fedora Education]     [Fedora Security]     [Fedora Scitech]     [Fedora Robotics]     [Fedora Infrastructure]     [Fedora Websites]     [Anaconda Devel]     [Fedora Devel Java]     [Fedora Desktop]     [Fedora Fonts]     [Fedora Marketing]     [Fedora Management Tools]     [Fedora Mentors]     [Fedora Package Review]     [Fedora R Devel]     [Fedora PHP Devel]     [Kickstart]     [Fedora Music]     [Fedora Packaging]     [Fedora SELinux]     [Fedora Legal]     [Fedora Kernel]     [Fedora OCaml]     [Coolkey]     [Virtualization Tools]     [ET Management Tools]     [Yum Users]     [Yosemite News]     [Gnome Users]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [Fedora Sparc]     [Libvirt Users]     [Fedora ARM]

  Powered by Linux