Mail Archives: djgpp/1996/10/13/02:02:51
ebromber AT forest DOT drew DOT edu wrote:
: I recently downloaded all of the files and installed them. Then when I
: went to compile a program that printed "hello" the compiler kept telling
: me that the iostream.h file was not found. But when I searched the
: directories it was there. Why is this happening?
: Thanks in advance
: ebromber AT drew DOT edu
Well, I would guess that you're compiling a C++ file. In order to get
the iostreams to work, you need to explicity link in the C++ library.
Seeing as how gcc is a one pass linker, you need to link in the C++
libary at the end of the command line. So try this:
gcc -g -o blah -c blah.cc -lgpp
I think this should work. If this doesn't work, look in the FAQ under
Compile Time Problems, and I know it explains it there (I had this
problem just yesterday, in fact).
-David :)
-----------------------------------------------------------------------------
David M. Barrett :) | University of Michigan / Vizlab Counselor
dbarrett AT engin DOT umich DOT edu | http://www-personal.engin.umich.edu/~dbarrett
-----------------------------------------------------------------------------
- Raw text -