Mail Archives: djgpp/1995/11/06/16:16:35

Xref: comp.os.msdos.djgpp:3071
From: maze AT rfs63 DOT Berkeley DOT EDU (Don R. Maszle)
Newsgroups: comp.os.msdos.djgpp
Subject: undefined internal symbols during link
Date: 1 Nov 1995 00:52:24 GMT
Organization: University of California, Berkeley
Lines: 44
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Dj-Gateway: from newsgroup comp.os.msdos.djgpp

Newsgroups: comp.os.msdos.djgpp
Subject: libc symbols not found
Keywords: djgpp_first_dtor, djgpp_last_dtor, djgpp_first_ctor, djgpp_last_ctor

Using gcc v2.6.3 and ld v2.5.2 (with BFD 2.5) I get undefined reference
errors of the listed internal symbols as in...


'Linking mcsim...'

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'
exit.c(.text+0x31): undefined reference to `djgpp_first_dtor'
exit.c(.text+0x3d): undefined reference to `djgpp_first_dtor'
exit.c(.text+0x44): undefined reference to `djgpp_first_dtor'
_main.c(.text+0x19): undefined reference to `djgpp_last_ctor'
_main.c(.text+0x1e): undefined reference to `djgpp_first_ctor'
_main.c(.text+0x2a): undefined reference to `djgpp_first_ctor'
_main.c(.text+0x31): undefined reference to `djgpp_first_ctor'
make.exe: *** [mcsim] Error 1

All four of these symbols are listed in my libc.a which is explicitely
included in the link as shown above.  I know that these are referenced
in the default link script \usr\lib\djgpp.lnk, but I don't really
understand what that is about.

Can anyone direct me to the simplest solution?  I don't think I
should have to muck with anything and I'm sure that some environment
variable is not set or something.

Don Maszle

- Raw text -

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