Hey, I have a problem with following code:
#include <stdio.h>
#include <math.h>
int main() {
int x;
x = 10;
printf("%.2f\n" , log(x));
}
when I try to compile it in GCC it shows an error message:
In function `main':
logarithm.c:(.t ext+0x19): undefined reference to `log'
how can I fix it?
Thans James
#include <stdio.h>
#include <math.h>
int main() {
int x;
x = 10;
printf("%.2f\n" , log(x));
}
when I try to compile it in GCC it shows an error message:
In function `main':
logarithm.c:(.t ext+0x19): undefined reference to `log'
how can I fix it?
Thans James
Comment