5 Replies - 50116 Views - Last Post: 28 August 2013 - 07:52 AM Rate Topic: -----

#1 worldofwar   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 47
  • Joined: 26-June 11

[Eclipse] Symbol 'std' could not be resolved

Posted 03 March 2013 - 08:13 AM

Hello,

So I'm used to using Eclipse when I program in Java.
I am now learning C++, but encountered a problem already.

I downloaded Eclipse C++ and the Cygwin toolchain.

Posted Image

I selected New > Create new sourcefile and named it Main.cpp

I entered some basic code in it like this:

#include <iostream>

using namespace std;



which gives me this error:

Posted Image

After building it I get this:

Posted Image

I don't get this in other IDE's, so I'm guessing it's a setting in Eclipse I missed.
I would rather not switch to another IDE since I've used Eclipse since I started programming.

Thanks in advance,
Worldofwar.

This post has been edited by worldofwar: 03 March 2013 - 08:14 AM


Is This A Good Question/Topic? 0
  • +

Replies To: [Eclipse] Symbol 'std' could not be resolved

#2 jimblumberg   User is online

  • member icon

Reputation: 5652
  • View blog
  • Posts: 17,354
  • Joined: 25-December 09

Re: [Eclipse] Symbol 'std' could not be resolved

Posted 03 March 2013 - 08:30 AM

To preface, I know nothing about Eclipse but, have you tried selecting the C++ Hello World C++ project option?

Jim
Was This Post Helpful? 0
  • +
  • -

#3 worldofwar   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 47
  • Joined: 26-June 11

Re: [Eclipse] Symbol 'std' could not be resolved

Posted 03 March 2013 - 08:35 AM

View Postjimblumberg, on 03 March 2013 - 08:30 AM, said:

To preface, I know nothing about Eclipse but, have you tried selecting the C++ Hello World C++ project option?

Jim


Looked promising, but what it did was start a file with this code:

#include <iostream>
using namespace std;

int main() {
	cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!!
	return 0;
}



But still has the same errors as I have in the other file.

Posted Image

Which IDE do you use? I might switch if there's no solution.

Thank you.
Was This Post Helpful? 0
  • +
  • -

#4 jimblumberg   User is online

  • member icon

Reputation: 5652
  • View blog
  • Posts: 17,354
  • Joined: 25-December 09

Re: [Eclipse] Symbol 'std' could not be resolved

Posted 03 March 2013 - 08:40 AM

I normally use Code::Blocks.

Are you sure you installed the C++ compiler? And are you sure you configured the IDE to find the compiler correctly?

Try compiling this:

int main()
{
   return(0);
}





Jim
Was This Post Helpful? 0
  • +
  • -

#5 worldofwar   User is offline

  • New D.I.C Head

Reputation: 2
  • View blog
  • Posts: 47
  • Joined: 26-June 11

Re: [Eclipse] Symbol 'std' could not be resolved

Posted 03 March 2013 - 08:45 AM

That compiled,
the error was the libraries, I found.

I went and searched some more, and stumbled upon this:

http://help.eclipse....proj_parser.htm

This solved my problem :)

Thank you.
Was This Post Helpful? 1
  • +
  • -

#6 zwei   User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 1
  • Joined: 28-August 13

Re: [Eclipse] Symbol 'std' could not be resolved

Posted 28 August 2013 - 07:52 AM

Just please simply save your program before you any further
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1