On Sun, Dec 05, 1999 at 09:09:14PM -0600, Brian G. Neal wrote:
> I am trying to port some C code from Windows (i.e. no
> makefile) and I am using gcc for the first time.
> One of the files has some sin() and cos() calls
> in it. And yes it includes math.h. If I do a:
>
> % gcc -o main main.c file1
On Sun, 5 Dec 1999, Brian G. Neal wrote:
> I assume I need to include some library that has sin/cos.
> I found the -l switch to pass libraries to the linker but
> I have no idea what library to use. Am I missing something
You need to use -lm (link libm, the math library).
2 matches
Mail list logo