delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/01/15/10:55:18

Date: Mon, 15 Jan 1996 17:38:36 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: Andrea Tasso <andrea DOT tasso AT galactica DOT it>
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*.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019