Mailinglist Archive: opensuse-programming (32 mails)
| < Previous | Next > |
newbie prob with sqrt in c
- From: oguz eren <oguze@xxxxxxx>
- Date: 29 Oct 2003 22:24:22 +0200
- Message-id: <1067458910.13510.49.camel@xxxxxxxxxxx>
Hi,
I'm so new with c language, therefore this may be a fool one.
Here's my code:
#include <stdio.h>
#include <math.h>
main()
{
double x;
x = 64.0;
printf("kok : %f.\n", sqrt(x));
return 0;
}
In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
Seems it can't find it in math.h; true? A grep showed me it's in
tgmath.h instead.But including tgmath.h also didn't change anything.
Thanks in advance..
I'm so new with c language, therefore this may be a fool one.
Here's my code:
#include <stdio.h>
#include <math.h>
main()
{
double x;
x = 64.0;
printf("kok : %f.\n", sqrt(x));
return 0;
}
In function `main':
: undefined reference to `sqrt'
collect2: ld returned 1 exit status
Seems it can't find it in math.h; true? A grep showed me it's in
tgmath.h instead.But including tgmath.h also didn't change anything.
Thanks in advance..
| < Previous | Next > |