Re: New to gcc: missing sin/cos

1999-12-06 Thread Eric G . Miller
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

Re: New to gcc: missing sin/cos

1999-12-06 Thread William T Wilson
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).