https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66361

            Bug ID: 66361
           Summary: Could not able to compile with
                    /opt/ELDK42/usr/bin/ppc-linux-g++
           Product: gcc
           Version: 4.2.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: c++
          Assignee: unassigned at gcc dot gnu.org
          Reporter: bolenedisatyanarayana at gmail dot com
  Target Milestone: ---

I was tring to compile a simple test.cpp.

here is my test.cpp

#include<iostream>
    using namespace std;
    int main()
    {
     cout<<"hello world";
     return 0;
    }

Compilation Errors:

test.cpp:1:19: error: iostream: No such file or directory
test.cpp: In function 'int main()':
test.cpp:10: error: 'cout' was not declared in this scope

Why it Could not able to fetch iostream from any include directories? So,I
tried compiling by explicitly including

/opt/ELDK42/usr/bin/ppc_85xx-g++ test.cpp
-I/opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/

Then, it gave the following errors:

In file included from test.cpp:1:
/opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/iostream:44:28: error:
bits/c++config.h: No such file or directory
In file included from /opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/ios:43,
                 from /opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/ostream:45,
                 from /opt/ELDK42/ppc_85xx/usr/include/c++/4.2./iostream:45,

But, i could see that missing header file here:

/opt/ELDK42/ppc_85xx/usr/include/c++/4.2.2/powerpc-linux/bits/c++config.h

    I am not able to figure out, why gcc is not able to find the header files
properly & compile??

Any help, highly appreciated.

System Details: Ubuntu 14.04 gcc 4.2.2

Reply via email to