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

Re: C compiler

On Tue, 2005-09-13 at 08:26 -0400, Shawn (Shu Xiang) Yu wrote:

I am new here. I just installed Debian on my system. When I try to compile a
c code with gcc, I got error says "undefined reference to 'sin'". This is
the same code run on Windows.

Anyone know how to fix it.

From "man sin"

#include <math.h>

       double sin(double x);
       float sinf(float x);
       long double sinl(long double x);

       Link with -lm.

Attachment: signature.asc
Description: This is a digitally signed message part

Reply to: