sudip wrote:
> Dear All,
> I'm having a nightmare compiling a small simple program on a Linux
> Fedora core 2 platform...the program goes like this...
>
> in file mathtest.c
>
> #include <math.h>
> #include <stdio.h>
>
> int main(void)
> {
> printf("%s%d\n","The value of sin(3) is: ", sin(3));
> return 0;
> }
>
> I'm compiling the above program by issuing the following command on
> bash shell...
>
> gcc -Wall -o mathtest mathtest.c
>
> the compiler is throwing the following error
>
> in function 'main':
> :undefined reference to 'sin'
>
> ...and stops the compilation process..
> I'm stuck up, and can't figure out the error..plz help
>
This is a FAQ. Find it. Read it. It's not that hard. (And doing so will
serve you *very* well in the long run.)
HTH,
--ag
--
Artie Gold -- Austin, Texas
http://it-matters.blogspot.com (new post 12/5)
http://www.cafepress.com/goldsays