Type "g++ math.c" and it should compile just fine. gcc gives me errors,
but g++ doesn't. 

> Hi, I am trying to compile some c code and have problems with gcc.
> This is my code saved as sample.c
> #include<stdio.h>
> #include<math.h>
> 
> int main(void)
> {
>   printf("%f", sin(3.14));
> }
> 
> then at terminal I tipe gcc sample.c and got error that sin is undefined.
> Samething happened for cos, sqrt.
> I did compile the same code using VC++ 6.
> I think the code compiled with no errors but is not linked.
-- 
Anthony
http://binaryfusion.net
Computers are not intelligent. They only think they are. 

Reply via email to