Date: Wed, 19 Nov 1997 17:06:28 +0200 (IST) From: Eli Zaretskii To: Michael Deck cc: Nate Eldredge , djgpp AT delorie DOT com Subject: Re: Problems building djgpp (long) In-Reply-To: <3471B2CA.5D26@cleansoft.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Tue, 18 Nov 1997, Michael Deck wrote: > E:\djgpp\mddtest>gcc -v -o test.exe test.cc > Reading specs from e:/djgpp/lib\specs > gcc version 2.7.2.1 > e:/djgpp/bin\ld.exe -o test.exe e:/djgpp/lib\crt0.o -Le:/djgpp/lib > test.cc -Tdj > gpp.djl -lgcc -lc -lgcc > test.cc: file not recognized: File format not recognized OK, I think I know what's your problem. It's an LFN snafu again. Before you read the rest, look at the file specs.h in the top-level gcc source directory (%DJDIR%/gnu/gcc-2721/). If it's empty, or includes only comments, then what I say below *is* your problem; otherwise you will have to step with a debugger into gcc and tell me why doesn't it recognize C++ sources. Here's what specs.h *should* say: /* specs.h */ #include "cp/lang-specs.h" #include "ada/lang-specs.h" Without these 2 include's, the rules that make gcc recognize C++ (and Ada) source files are not known to gcc, and it by default assumes that these files are linker scripts or object files. Here are the relevant lines from config/msdos/configure.bat: if not exist cp\make-lang.in goto no_cp ... if exist cp\lang-options.h echo #include "cp/lang-options.h" >> options.h if exist ada\lang-options.h echo #include "ada/lang-options.h" >> options.h if exist f\lang-options.h echo #include "f/lang-options.h" >> options.h echo /* specs.h */ > specs.h if exist cp\lang-specs.h echo #include "cp/lang-specs.h" >> specs.h if exist ada\lang-specs.h echo #include "ada/lang-specs.h" >> specs.h if exist f\lang-specs.h echo #include "f/lang-specs.h" >> specs.h Since the original distribution is not LFN-clean, it comes with lang-spe.h, lang-opt.h etc., and COMMAND.COM thinks these files don't exist. So the relevant lines are not written into the headers options.h and specs.h. If cp/make-lang.in doesn't exist, cp/Makefile won't be even created. You need to rename those files to their original long names. After that, run "configure go32" again, delete gcc.o and say "make CFLAGS=-O2" again. Then chdir to cp, delete all *.o files and say "make CFLAGS=-O2" there also. Now you should have gcc and cc1plus.