not finding iostream

General questions regarding the usage of CodeLite
vince78
CodeLite Curious
Posts: 2
Joined: Fri Apr 27, 2012 1:24 pm
Genuine User: Yes
IDE Question: c++
Contact:

not finding iostream

Post by vince78 »

Hi,

I am a complete newbe in C++.
I am trying to run this code:
#include <iostream>
using namespace std;
int main()
{
count<<"hello world\n";
cin.get();
}
but it can not compile:

gcc -c "/home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c" -g -o ./Debug/main.o -I. -I.
/home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c:1:20: fatal error: iostream: No such file or directory
compilation terminated.


so I thought the compiler could not find iostream. I looked for it and found it is in /usr/include/c++/4.6/
I changed the settings of the project accordingly:
project settings/compiler/include paths: /usr/include/c++/4.6/

Now I have this error:
gcc -c "/home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c" -g -o ./Debug/main.o -I. -I. -I/usr/include/c++/4.6/
In file included from /home/vincent/Dropbox/learning/cplusplus/tutorial/tutorial/main.c:1:0:
/usr/include/c++/4.6/iostream:39:28: fatal error: bits/c++config.h: No such file or directory
compilation terminated.


Another things that I do not get is that I configured to use g++:
project settings/general/compiler: gnu g++
but apparently gcc is used instead. Not sure why.

Anything I am missing ?

Many thanks !

Vincent
vince78
CodeLite Curious
Posts: 2
Joined: Fri Apr 27, 2012 1:24 pm
Genuine User: Yes
IDE Question: c++
Contact:

Re: not finding iostream

Post by vince78 »

aaaaah, how stupid am I ?
I was working on a c project, not a c++ ....
gulp gulp
Post Reply