www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1995/11/07/01:04:22

Date: Tue, 7 Nov 1995 07:46:14 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Don R. Maszle" <maze AT rfs63 DOT Berkeley DOT EDU>
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu
Subject: Re: undefined internal symbols during link

On 1 Nov 1995, Don R. Maszle wrote:

> gcc -g -o mcsim getopt.o gibbs.o lex.o lexerr.o lexfn.o list.o		\
> lsodes1.o lsodes 2.o matutil.o matutilo.o model.o modelu.o random.o	\
> sim.o simhelp.o simi.o simini t.o simmonte.o simo.o strutil.o		\
> yourcode.o -lm -lc
> 
> exit.c(.text+0x2c): undefined reference to `djgpp_last_dtor'

Did you try to link without -lc at the end?  Gcc adds it automagically, 
but it does it in a way that's correct (-lc must have -lgcc before and 
after it), so it's possible that ld sees your -lc is too early on the 
command line.

- Raw text -


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