[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: cos() in math.h ?



> 	/tmp/cc9WOsLC.o(.text+0x16): undefined reference to `cos'
> 	collect2: ld returned 1 exit status

Try adding -lm to your compile command.   That tells gcc to use the math
lib.

		Ian




Reply to: