[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Setting include path
From: |
Bernd Strieder |
Subject: |
Re: Setting include path |
Date: |
Tue, 17 Oct 2006 15:48:58 +0200 |
User-agent: |
KNode/0.10.1 |
Hello,
Sukumar R wrote:
> Hi all,
>
> I've recently downloaded and installed gcc-3.2.3. But when I try
> compiling a sample C++ program using the newly installed g++3.2.3, the
> errors I'm getting are:
>
> $ which g++
> /home/rsukumar/privatePrgms/g++_3.2.3/objdir/gcc/g++
This seems like a pretty non-standard installation already.
> $
> $ g++ a.cpp
> a.cpp:1:22: iostream.h: No such file or directory
Installation must have failed, or you have not followed the
instructions. How did you call configure, when building gcc? What does
g++ -V say?
> a.cpp: In function `int main()':
> a.cpp:6: `cout' undeclared in namespace `std'
> a.cpp:6: `endl' undeclared in namespace `std'
BTW iostream.h is deprecated. When found, it provides iostreams in the
global namespace, not in the std namespace. So using std::cout in your
code would have failed anyway. This can be said without seeing the
source.
>
> How can I set the include path for all the standard header files? So
> that compiler can refer to the header files available in the newly
> installed directory.
Should never be necessary. I've built gcc many times over the years
according to the docs and never had problems like this.
Bernd Strieder