Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Building confusion using C++
Building confusion using C++ [message #902857] Mon, 20 August 2012 14:23
H vN is currently offline H vN
Messages: 9
Registered: November 2009
Junior Member
Hi,

Using openSuse 12.1 and CentOS 6.3, both x64, and Eclipse Juno with CDT for Juno, I experience some weird behaviour. When writing some simple code as for printing "Hello" in C, there is no problem. However, when I try the same in C++, using this code:

#include <iostream>

using namespace std;

int main()
{
cout << "Hello" << endl;

return 0;
}

it says:
<iostream>: unresolved inclusion
Symbol 'std' could not be resolved
Symbol 'cout' could not be resolved
Symbol 'endl' could not be resolved

Then, because I know g++ and libs have been installed, I build the project, create the configuration and run it. And it does print "Hello" in the console. Can somebody explain this? It is rather confusing and never had this in the many years I've used Eclipse/CDT.

Thank you.
Previous Topic:Eclipse showing false bugs when using CDT + QT + Opengl
Next Topic:CDT Debugger(gdb/mi) Console Bug
Goto Forum:
  


Current Time: Fri Aug 29 10:28:12 EDT 2014

Powered by FUDForum. Page generated in 0.02272 seconds