Date: Tue, 7 Nov 1995 07:46:14 +0200 (IST) From: Eli Zaretskii To: "Don R. Maszle" 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.