Re: Problem compiling simple C program
John Salmon wrote:
> That solved the linking problem. Now, after a successful compilation, when
> I run 'test' I gen no output. ???
>
It works for me.
$cat using_sin.c
#include <stdio.h>
#include <math.h>
int main()
{
double val = 1.55;
printf("sine: %g\n", sin(val));
return 0;
}
$gcc using_sin.c -lm -o using_sin
$./using_sin
sine: 0.999784
I am using Debian Etch + some packages from Lenny, gcc 4.2.3-2
hth
raju
--
Kamaraju S Kusumanchi
http://www.people.cornell.edu/pages/kk288/
http://malayamaarutham.blogspot.com/
Reply to: