You are not logged in.
Pages: 1
hey, having a bit of trouble here! a simple example would be:
#include <stdio.h>
#include <math.h>
main()
{
double k=2.33;
printf("%lf\n", sin(k));
}
when i compile this with gcc
i get an error, undefined ref to sin?
its seem not to be taking assigned arguments (???)
is there extra packages i need to download?
sorry, im new to arch..
Last edited by blackcobra (2010-12-10 14:40:50)
Dan
Offline
Add "-lm" to your gcc line.
Offline
thanks!! i forgot!
Last edited by blackcobra (2010-12-10 14:52:16)
Dan
Offline
Pages: 1