Date: Wed, 26 Jun 1996 08:15:21 +0200 (IST) From: Eli Zaretskii To: Brian Takle Cc: djgpp AT delorie DOT com Subject: Re: linker problems? In-Reply-To: <31D06E6A.EC@uwrf.edu> Message-Id: Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Tue, 25 Jun 1996, Brian Takle wrote: > unexpected)... 'djgpp_last_ctor' (and first_ctor and first_dtor and > last_dtor)... these are in libc.a right? No, they are defined by the djgpp.lnk linker script. > /* DPMI reported by go32-v2 */ > go32/v2 version 2.0 built Jan 23 1996 22:03:02 > DPMI memory available: 4236 Kb > DPMI swap space available: 3508 Kb ^^^^^^^ That's too small swap space (that is NOT the cause of your problems, but still). Is your disk full? > /* djgpp environment setting */ > DJGPP=c:/usr/djgpp.env Is `djgpp.env' indeed in "c:/usr" directory? Didn't you create a special directory for DJGPP *under* c:/usr? DJGPP assumes that the directory part of the DJGPP.ENV pathname (i.e. "c:/usr" in your case) is the main DJGPP installation directory, and it expects to find all the other subdirectory (like `lib', where it looks for the libraries and the `djgpp.lnk' script) in that directory. If you moved `djgpp.env' out of the DJGPP main installation directory, that logic will fail. > /* output of gcc -v */ > gcc version 2.7.2 > ld -o dxetest /usr/lib/crt0.o -L/usr/lib dxetest.o -lgcc -lc -lgcc > _main.c(.text+0x1a): undefined reference to `djgpp_last_ctor' This seems to suggest that my guess is correct, and DJGPP.ENV is indeed NOT in the root of the DJGPP installation tree. But please do not edit or censor the output of "gcc -v"! You should post it in its entirety, because it includes crucial information required to understand what went wrong on your system, and you might not know where that information is. It is hard enough to debug problems by remote control, so please do not spare us all the info that you can give. Yes, I know that the output of gcc -v is *very* voluminous; that is why you might consider redirecting it to a file, like this: redir -e gcc.lst -oe gcc -v .... Then just post the contents of gcc.lst. `redir' is a program that comes with DJGPP and is described in the docs (type "info utils redir" and hit [Enter] if you want to learn more about it, but only after your installation problems are solved).