From: Jeff S. <js...@ea...> - 2008-01-22 05:37:29
|
huangshuo wrote: > I have writen a c program, and i compiled that by typing "make" for my > gumstix. > I have done several C files in this way, which were all OK. This time, I > include <math.h> file in my program, and there are some errors...... > > undefined reference to 'cos' > > I know that, in a normal linux PC, there would be something wrong to include > <math.h> using gcc. > > Here, could anyone tell me how to compile this file? > > Thank you so much > > Undefined reference means you got the header and forgot to specify the so in the linker "-lm" in the gcc line IIRC |