Symbol could not be resolved - MinGW + STL [message #790534] |
Sat, 04 February 2012 11:59  |
Eclipse User |
|
|
|
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] by Moderator Report message to a moderator
|
|
|
|
Re: Symbol could not be resolved - MinGW + STL [message #791874 is a reply to message #790534] |
Mon, 06 February 2012 11:03   |
Eclipse User |
|
|
|
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] by Moderator 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   |
Eclipse User |
|
|
|
Jeroen Meij wrote on Mon, 06 February 2012 06:03I 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   |
Eclipse User |
|
|
|
Jeroen Meij wrote on Mon, 06 February 2012 06:03I 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 #948725 is a reply to message #900039] |
Thu, 18 October 2012 10:04   |
Eclipse User |
|
|
|
I know this topic is a few months old, but I hope someone can still help me!
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 #1017039 is a reply to message #964772] |
Fri, 08 March 2013 17:52   |
Eclipse User |
|
|
|
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
|
|
|
|
Powered by
FUDForum. Page generated in 0.05948 seconds