Date: Mon, 15 Jan 1996 17:38:36 +0200 (IST) From: Eli Zaretskii To: Andrea Tasso Cc: djgpp AT delorie DOT com Subject: Re: undefined reference for math functions On Mon, 15 Jan 1996, Andrea Tasso wrote: > with the command: gcc -lm sin.c > > I get the following error message: > > sin.c(.text+0x20): undefined reference to 'sin'. Once again: please, *please*, PLEASE read the FAQ! It answers this question in section 8.10. DJGPP uses a one-pass linker, so the order of the files on the command line is important; in this case, put the -lm *last*.