Mailinglist Archive: opensuse-programming (118 mails)
| < Previous | Next > |
Re: [suse-programming-e] math.h
- From: Colin Carter <colincarter@xxxxxxxxxxxxxx>
- Date: Fri, 8 Apr 2005 23:36:37 +1000
- Message-id: <200504082336.37659.colincarter@xxxxxxxxxxxxxx>
Hi Håkon and Joe,
I found relevant documentation on libraries in my book
by Kurt Wall et al "Linux Programming".
Thanks for your pointers.
Regards,
Colin
On Friday 08 April 2005 22:56, Colin Carter wrote:
> On Friday 08 April 2005 22:18, Hallingstad Håkon wrote:
> > Add -lm when compiling
>
> Thanks Håkon, it worked, but I didn't know that I had to
> specifically link with libm.a I am used to the maths libraries
> being part of the standard search.
> Regards,
> Colin
>
> > Regards,
> > Håkon Hallingstad
> > Software Developer, EDB
> > +47 2252 8218
> > hakon.hallingstad@xxxxxxx
> > www.edb.com
> > "IT er ikke alt - men det hjelper"
> >
> >
> >
> > -----Original Message-----
> > From: Colin Carter [mailto:colincarter@xxxxxxxxxxxxxx]
> > Sent: 8. april 2005 14:11
> > To: suse-programming-e@xxxxxxxx
> > Subject: [suse-programming-e] math.h
> >
> >
> >
> > Hi,
> > I have just moved into Linux and compiled, linked and executed a simple C
> > program with X Window. This required standard #include <...> But when I
> > tried to use sqrt() I added #include <math.h> but
> > x = sqrt ( x );
> > gives me 'undefined reference 'sqrt'
> >
> > Any ideas?
> > Regards,
> > Colin
> >
> >
> > --
> > To unsubscribe, email: suse-programming-e-unsubscribe@xxxxxxxx
> > For additional commands, email: suse-programming-e-help@xxxxxxxx Archives
> > can be found at: http://lists.suse.com/archive/suse-programming-e
I found relevant documentation on libraries in my book
by Kurt Wall et al "Linux Programming".
Thanks for your pointers.
Regards,
Colin
On Friday 08 April 2005 22:56, Colin Carter wrote:
> On Friday 08 April 2005 22:18, Hallingstad Håkon wrote:
> > Add -lm when compiling
>
> Thanks Håkon, it worked, but I didn't know that I had to
> specifically link with libm.a I am used to the maths libraries
> being part of the standard search.
> Regards,
> Colin
>
> > Regards,
> > Håkon Hallingstad
> > Software Developer, EDB
> > +47 2252 8218
> > hakon.hallingstad@xxxxxxx
> > www.edb.com
> > "IT er ikke alt - men det hjelper"
> >
> >
> >
> > -----Original Message-----
> > From: Colin Carter [mailto:colincarter@xxxxxxxxxxxxxx]
> > Sent: 8. april 2005 14:11
> > To: suse-programming-e@xxxxxxxx
> > Subject: [suse-programming-e] math.h
> >
> >
> >
> > Hi,
> > I have just moved into Linux and compiled, linked and executed a simple C
> > program with X Window. This required standard #include <...> But when I
> > tried to use sqrt() I added #include <math.h> but
> > x = sqrt ( x );
> > gives me 'undefined reference 'sqrt'
> >
> > Any ideas?
> > Regards,
> > Colin
> >
> >
> > --
> > To unsubscribe, email: suse-programming-e-unsubscribe@xxxxxxxx
> > For additional commands, email: suse-programming-e-help@xxxxxxxx Archives
> > can be found at: http://lists.suse.com/archive/suse-programming-e
| < Previous | Next > |