Date: Mon, 13 Apr 1998 13:32:52 +0300 (IDT) From: Eli Zaretskii To: Paul Derbyshire cc: djgpp AT delorie DOT com Subject: Re: Inconsistent gcc and gxx behavior In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Mon, 13 Apr 1998, Paul Derbyshire wrote: > Using builtin specs. ^^^^^^^^^^^^^^^^^^^ I think this is a symptom of your problem. Does gcc print this line as well? Or does it say "Using specs from c:/djgpp/lib\specs"? > gcc version pgcc-2.90.23 980102 (egcs-1.0.1 release) > ld -o datetest.exe crt0.o datetest.o ofcdate.o ofcser.o ^^^^^^ This is another telltale sign of a problem: crt0.o should be mentioned with its full pathname, in your case c:/djgpp/lib\crt0.o. > crt0.o is in C:\DJGPP\Lib right where the linker expects it to be....and where > it finds it, if I compile with gcc instead of gxx. The linker doesn't expect crt0.o to be anywhere. For the linker, crt0.o is just another object file, so it needs to see its full pathname, otherwise it will look for it in the current directory only. The way it should work, gcc calls ld and attaches %DJDIR%/lib to crt0.o when it constructs the ld command line. I cannot guess why gcc invoked by gxx doesn't read lib/specs and doesn't prepend %DJDIR%/lib to crt0.o; it does for me. Are you using gxx from djdev201.zip (that's what I'm using)? Did you maybe edit DJGPP.ENV? If so, please try the original DJGPP.ENV. If these two clues don't help, try to find the cause for this.