Problem with g++ compilation

lakshmikanth t.lakshmikanth at gmail.com
Thu Nov 6 06:14:06 CET 2008




"find / -name iostream" or "find / | grep iostream" .... i found no
results!!!!

as said by Peter i even tried for including the statement "use namespase
std;"..no outcome...i still get the same error!!

what could be the reason?...am i missing any libraries/pakages?


Joachim Ott-2 wrote:
> 
> 2008/11/5 lakshmikanth <t.lakshmikanth at gmail.com>
> 
>>
>> HI
>>
>> A sample file test.C compilation attempt with g++ :
>>
>> *********************************************************************************
>> root at om-gta02:~/kanth/c_prgs# cat test.C
>>
>> #include<iostream>
>> main()
>> {
>> int x;
>> cout<<"Testing G++"<<endl;
>> for(x=0;x<10;x++)
>> cout<<x<<endl;
>> }
>>
>> root at om-gta02:~/kanth/c_prgs# g\+\+ -o test test.C
>> test.C:1:19: error: iostream: No such file or directory
>> test.C: In function 'int main()':
>> test.C:5: error: 'cout' was not declared in this scope
>> test.C:5: error: 'endl' was not declared in this scope
>> root at om-gta02:~/kanth/c_prgs#
>>
>>
>>
>> *********************************************************************************
>>
>> It shows error with iostream : Where should i include the header files if
>> at
>> all. And where do i get Header files from(i read some where that normal
>> header files cannot be added). Am i required to install an other
>> packages?
> 
> 
>  The c++ includes must have been installed together with the compiler and
> the standard place is /usr/include/c++. Check where it is with "find /
> -name
> iostream". If it's in a strange place, add an option: g++
> -Idirectory_where_iostream_is -o mytest test.C (test is also the name of a
> builtin command).
> 
> _______________________________________________
> support mailing list
> support at lists.openmoko.org
> https://lists.openmoko.org/mailman/listinfo/support
> 
> 

-- 
View this message in context: http://n2.nabble.com/gcc-cant-find-cc1%2C-g%2B%2B-cant-find-crt1.o-tp664447p1463560.html
Sent from the Openmoko Support mailing list archive at Nabble.com.




More information about the support mailing list