Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Symbol could not be resolved - MinGW + STL(Eclipse can't find symbols in STL header files)
Symbol could not be resolved - MinGW + STL [message #790534] Sat, 04 February 2012 11:59 Go to next message
Dylan Kiss is currently offline Dylan KissFriend
Messages: 2
Registered: February 2012
Junior Member
I set up Eclipse on my Windows 7 32-bit computer and installed MinGW as well.
When I create a new project and add the appropriate include paths, I can use everything from the standard library and it compiles smoothly.
The thing that bothers me is that Eclipse keeps underlining every symbol I use from the standard library, saying: "Symbol <symbol-i-used> could not be resolved".

For example:
#include <iostream>
using namespace std;

int main(int argc, char* argv[]) {
	cout << "Hello, World!" << endl;	// Symbol 'cout' could not be resolved
	return 0;
}


If somebody would have a solution for this, I'd be very grateful, because what do you use an IDE for? Exactly, to make coding easier (like autocomplete features).

[Updated on: Sat, 04 February 2012 12:02]

Report message to a moderator

Re: Symbol could not be resolved - MinGW + STL [message #791846 is a reply to message #790534] Mon, 06 February 2012 10:21 Go to previous messageGo to next message
Harry Houdini is currently offline Harry HoudiniFriend
Messages: 142
Registered: February 2010
Senior Member
In the project's Properties, go to C/C++ Build -> Tool Chain Editor.

Whta is the setting for Current toolchain ?
Re: Symbol could not be resolved - MinGW + STL [message #791874 is a reply to message #790534] Mon, 06 February 2012 11:03 Go to previous messageGo to next message
Jeroen Meij is currently offline Jeroen MeijFriend
Messages: 1
Registered: February 2012
Junior Member
I seem to be having the same problem. I can build and run my hello world application, but 'cout' remains unsolved. I have read some other topics to find solutions, but have not been succesfull so far. My system seems identical to the topic starter, a windows 32bit system with CDT and MinGW.

To answer the reply for my case.
Current Toolchain - MinGW GCC
Current Builder - CDT Internal Builder

I have made some progress though. When I started of even iostream and std couldn't be resolved, but adding 'C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\' to paths and symbols at GNU C++ solved that.

Hope you guys can help out.

EDIT: I found out. By expanding the paths and symbols with the following options:

C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++
C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\mingw32
C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\backward
C:\MinGW\lib\gcc\mingw32\4.6.1\include
C:\MinGW\include
C:\MinGW\lib\gcc\mingw32\4.6.1\include-fixed

The option 'cout' is now resolved.

[Updated on: Mon, 06 February 2012 11:53]

Report message to a moderator

Re: Symbol could not be resolved - MinGW + STL [message #793208 is a reply to message #791874] Tue, 07 February 2012 22:12 Go to previous messageGo to next message
Dylan Kiss is currently offline Dylan KissFriend
Messages: 2
Registered: February 2012
Junior Member
Jeroen Meij wrote on Mon, 06 February 2012 06:03
I seem to be having the same problem. I can build and run my hello world application, but 'cout' remains unsolved. I have read some other topics to find solutions, but have not been succesfull so far. My system seems identical to the topic starter, a windows 32bit system with CDT and MinGW.

To answer the reply for my case.
Current Toolchain - MinGW GCC
Current Builder - CDT Internal Builder

I have made some progress though. When I started of even iostream and std couldn't be resolved, but adding 'C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\' to paths and symbols at GNU C++ solved that.

Hope you guys can help out.

EDIT: I found out. By expanding the paths and symbols with the following options:

C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++
C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\mingw32
C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\backward
C:\MinGW\lib\gcc\mingw32\4.6.1\include
C:\MinGW\include
C:\MinGW\lib\gcc\mingw32\4.6.1\include-fixed

The option 'cout' is now resolved.


Adding these include directories solved my problem as well.
Thank you very much for helping me out.
Re: Symbol could not be resolved - MinGW + STL [message #804059 is a reply to message #791874] Wed, 22 February 2012 06:21 Go to previous messageGo to next message
Kit Yam Tse is currently offline Kit Yam TseFriend
Messages: 1
Registered: February 2012
Junior Member
Jeroen Meij wrote on Mon, 06 February 2012 06:03
I seem to be having the same problem. I can build and run my hello world application, but 'cout' remains unsolved. I have read some other topics to find solutions, but have not been succesfull so far. My system seems identical to the topic starter, a windows 32bit system with CDT and MinGW.

To answer the reply for my case.
Current Toolchain - MinGW GCC
Current Builder - CDT Internal Builder

I have made some progress though. When I started of even iostream and std couldn't be resolved, but adding 'C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\' to paths and symbols at GNU C++ solved that.

Hope you guys can help out.

EDIT: I found out. By expanding the paths and symbols with the following options:

C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++
C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\mingw32
C:\MinGW\lib\gcc\mingw32\4.6.1\include\c++\backward
C:\MinGW\lib\gcc\mingw32\4.6.1\include
C:\MinGW\include
C:\MinGW\lib\gcc\mingw32\4.6.1\include-fixed

The option 'cout' is now resolved.

It works for me too. However, I need to add these paths once again when I create a new project.
Is there any method to save the path in the properties??
Re: Symbol could not be resolved - MinGW + STL [message #829573 is a reply to message #790534] Mon, 26 March 2012 13:47 Go to previous messageGo to next message
janssen bulaclac is currently offline janssen bulaclacFriend
Messages: 1
Registered: March 2012
Junior Member
I dont know if this helps but the "Symbol 'cout' could not be resolved"
error was fixed when I created a source folder and placed the source file inside it.

EDIT:

i placed the source file outside the source folder and deleted the source folder, i couldn't replicate the error anymore. weird.

[Updated on: Mon, 26 March 2012 14:15]

Report message to a moderator

Re: Symbol could not be resolved - MinGW + STL [message #885832 is a reply to message #829573] Wed, 13 June 2012 17:21 Go to previous messageGo to next message
Michael Crump is currently offline Michael CrumpFriend
Messages: 1
Registered: June 2012
Junior Member
I was having this same problem on Linux using gcc with new projects that I created. I found that if I closed the project and reopened it everything was ok.
Re: Symbol could not be resolved - MinGW + STL [message #900039 is a reply to message #885832] Fri, 03 August 2012 15:07 Go to previous messageGo to next message
Michael van der Nest is currently offline Michael van der NestFriend
Messages: 1
Registered: August 2012
Junior Member
This worked for me on Windows
Re: Symbol could not be resolved - MinGW + STL [message #948725 is a reply to message #900039] Thu, 18 October 2012 10:04 Go to previous messageGo to next message
Andrea Carlino is currently offline Andrea CarlinoFriend
Messages: 1
Registered: October 2012
Junior Member
I know this topic is a few months old, but I hope someone can still help me! Smile

I'm in the same configuration of the other people here: Eclipse Indigo + CDT, based on MinGW on a Windows 7 PC. The only difference is that I'm using a 64-bit PC.
I tried the proposed solution but I still see the "Symbol 'cout' could not be resolved" error message.

Is that a problem related to the 64-bit PC???

Thanks,
Andrea
Re: Symbol could not be resolved - MinGW + STL [message #964772 is a reply to message #948725] Tue, 30 October 2012 19:40 Go to previous messageGo to next message
Oscar Kramer is currently offline Oscar KramerFriend
Messages: 3
Registered: October 2012
Junior Member
Closing the project (right-click on the project, "Close Project") and then reopening worked for me. Thanks!!!!
Re: Symbol could not be resolved - MinGW + STL [message #1017039 is a reply to message #964772] Fri, 08 March 2013 17:52 Go to previous messageGo to next message
Mike Feher is currently offline Mike FeherFriend
Messages: 2
Registered: March 2013
Junior Member
I just tried to close and re-open the project and at first glance, the problem seemed to have gone away, but nope, I still get "Symbol 'cout' could not be resolved":

#include <iostream>
using namespace std;

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


I am using Eclipse 3.8 under Ubuntu 12.10 inside VirtualBox 4.2.8. My Tool Chain Editor settings:

Current toolchain: Linux GCC
Current builder: CDT Internal BUilder
Used tools:
GCC Archiver
GCC C++ Compiler
GCC C Compiler
GCC C Linker
GCC C++ Linker
GCC Assembler

The thing is, the program runs fine even though I get the 2 problems.

Mike
Re: Symbol could not be resolved - MinGW + STL [message #1250717 is a reply to message #1017039] Wed, 19 February 2014 14:21 Go to previous message
Nikesh Yadav is currently offline Nikesh YadavFriend
Messages: 1
Registered: February 2014
Junior Member
My system configuration is same as yours and i have same problem..if you have resolved the issue .can you explain it...The problem is sorted out when i close and reopen the project again ..but this is not appropriate solution.
Previous Topic:Issue w/ Cross Compiler Project in Kepler...
Next Topic:Wrong JPEG Library
Goto Forum:
  


Current Time: Sat Dec 14 05:13:42 GMT 2024

Powered by FUDForum. Page generated in 0.05554 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top