Thursday 27 December 2012

How to compile C programs that include trigonometry or math functionality such as sin, cos() and tan()


With some gcc installations (e.g. on my Raspberry Pi) then you need to include the math library (-lm) in the link process :
gcc -Wall program.c -o program -lm

If you have found this solution useful then please do hit the Google (+1) button so that others may be able to find it as well.
Numerix-DSP Libraries : http://www.numerix-dsp.com/eval/

1 comment: