Date: Thu, 13 Nov 1997 13:46:28 +0200 (IST) From: Eli Zaretskii To: Daniel Gowans cc: djgpp AT delorie DOT com Subject: Re: cannot load header files In-Reply-To: <346A9A5B.A3B61F5C@m.cc.utah.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Precedence: bulk On Wed, 12 Nov 1997, Daniel Gowans wrote: > I cannot get it to work. It will NOT load the header files. ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ This is incorrect analysis. Your gcc -v trace says something else: > c:\djgpp\bin\ld.exe -o prog2.exe c:\djgpp\lib\crt0.o -Lc:\djgpp\lib > c:\djgpp\tmp\ccdaaaaa -lm -Tdjgpp.djl -lgcc -lc -lgcc > c:\djgpp\tmp\ccdaaaaa(.text+0x323):prog2.cc: undefined reference to > `ifstream::ifstream(int)' > c:\djgpp\tmp\ccdaaaaa(.text+0x33a):prog2.cc: undefined reference to > `cout' It cannot find necessary *libraries*, not header files. The linker doesn't give a damn about headers. The reason is that you didn't follow the advice of README.1ST and the FAQ: when linking C++ programs, use gxx instead of gcc. gxx instructs the linker to scan the C++ class libraries. > #include <...> search starts here: > c:\djgpp\lang\cxx > c:\djgpp\include > c:\djgpp\contrib\grx20\include Did you edit your DJGPP.ENV file? If not, these paths should have been printed with forward slashes. If you did edit DJGPP.ENV, please revert it to its stock version (you might have trouble with some DJGPP programs otherwise).