Mail Archives: djgpp/1995/11/07/01:04:22
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 -