score:6
The problem was that I needed to have both minGW and MSYS installed and added to PATH.
The problem is now fixed.
score:0
I had this issue with AOSP (clang).
Add external\libcxx\include
to includes and _LIBCPP_COMPILER_CLANG
to symbols
score:0
Hello here is a simple solution,
Just go to File -> Convert to a C/C++ Autotools Project Select your project files appropriately.
Inclusions will be added to your project file
score:0
Set ${COMMAND}
to g++
on Linux
Under "Preprocessor Include Paths, Macros, etc." and "CDT GCC Built-in Compiler Settings" there is an undefined ${COMMAND}
variable if you imported the sources from an existing Makefile project.
Eclipse tries to run that command to parse its stdout to find headers, but ${COMMAND}
is not set by default, and so it is not able to do so.
I have explained this in more detail at: How to solve "Unresolved inclusion: <iostream>" in a C++ file in Eclipse CDT?
score:1
I had the same problem. Change the CurrentBuilder in Properties/C/C++ Build/ToolChainEditor to another value and apply it. Then again change it the original value. It works.
score:3
I had the same problem. Adding include path does work for all except std::string.
I noticed in the mingw-Toolchain many system header files *.tcc
I added filetype *.tcc as "C++ Header File" in Preferences > C/C++/ File Types. Now std::string can be resolved from the internal index and Code Analyzer. Perhaps this is added to Eclipse CDT by default in feature.
I hope this helps to someone...
PS: I'm using Eclipse Mars, mingw gcc 4.8.1, Own Makefile, no Eclipse Makefilebuilder.
score:4
You need to ensure your environment is properly setup in Eclipse so it knows the paths to your includes. Otherwise, it underlines them as not found.
score:6
I've just replied to the related question given by Vanuan (Eclipse CDT: Unresolved inclusion of stl header), and this is my answer :
You could also try use "CDT GCC Built-in Compiler Settings". Go to the project properties > C/C++ General > Preprocessor Include Path > Providers tab then check "CDT GCC Built-in Compiler Settings" if it is not.
None of the other solutions (play with include path, etc) worked for me for the type 'string', but this one fixed it.
score:74
I've also had this issue.
I've found out that it is because Eclipse couldn't find all include headers.
Easy fix:
This simple and quick solution might fix your problem (for example, when the Eclipse project was moved to a different location on disk, then imported again in Eclipse), if not, jump to the next section (Detailed fix).
- Go to project > properties > C/C++ Build > Tool Chain Editor
- Change the Current toolchain to any other value, click Apply
- Set the Current toolchain to the original value, click Apply
- Compile your project
Detailed fix:
Before proceeding check if your toolchain is properly installed.
- Switch to a new workspace.
- Remove .cproject file and the ".settings" folder
- Import your project as Makefile project (or just create a new if you prefer CDT Build system)
- Go to project-> properties->C/C++ Build->Toolchain editor. Choose your toolchain.
- Press project->Index->Rebuild
- If the problem isn't resolved, change system language to English and try the above steps again.
Outdated answer:
This answer has been outdated. Proceed if nothing of the above helps
If the previous steps don't help we'll need to setup include directories manually (not recommended though)
- Search all unresolved headers using "Right click on Project > Index > Search for unresolved includes".
- Search their locations using "find /usr/include/ -name vector -print"
- Put include folder paths to "Right click on Project > Properties > C++ General/Path and Symbols/C++"
- Run "Right click on Project > Index > Rebuild"
- Start from step 1 if there are any unresolved symbols left.
Source: stackoverflow.com
Related Query
- "string could not resolved" error in Eclipse for C++ (Eclipse can't resolve standard library)
- Eclipse could not resolve string resource error
- Eclipse c++ Type could not be resolved error even though build is successful
- Eclipse method could not be resolved for vector of vectors
- Gradle eclipse plugin : Could not find method jcenter() for arguments [] on repository container. See error log for details
- C++ error Type 'std::thread' could not be resolved Eclipse Mars 4.5 , Ubuntu 12.04
- in play framework, the file xx.java could not be compiled. error raised is : the import yyy cannot be resolved in eclipse
- Function 'sqrt' could not be resolved - Eclipse for Windows
- artifacts could not be resolved error while creating Eclipse Maven project
- Exporting a product (on top of Eclipse e4) and trying to launch the same leaves behind a error stating that come Bundles could not be resolved
- Eclipse Error for GLPK library: The dynamic link library for GLPK for Java could not beloaded
- Eclipse CDT: Symbol 'cout' could not be resolved
- Eclipse could not delete error
- Error launching Eclipse 4.4 "Version 1.6.0_65 of the JVM is not suitable for this product."
- Eclipse C++: Symbol 'std' could not be resolved
- Eclipse Indigo CDT: Function could not be resolved
- error , Symbol 'vector' could not be resolved
- Eclipse Gradle STS Extension: Could not reserve enough space for object heap
- "Plugin not found for prefix" error in Eclipse
- "Cannot switch on a value of type String for source level below .." error in Eclipse
- "method is ambiguous for the type" but the types are NOT ambiguous (and the error comes by upgrade from eclipse 3.7.2 to eclipse 4.2)
- Checkstyle Error in Eclipse - Could not instantiate Tab character
- false error from Eclipse: Function '__android_log_print' could not be resolved (Android, CDT)
- Save Could not be completed. ECLIPSE ERROR
- Eclipse Mars: Symbol 'unique_ptr' could not be resolved
- Eclipse Method could not be resolved in a simple program C++
- Eclipse - Could not publish server configuration for Tomcat8.0 server at localhost
- Android NDK in Eclipse Type size_t could not be resolved
- Cocos2D-X for android, Symbol 'cocos2d' could not be resolved
- getopt_long could not be resolved in Eclipse CDT
More Query from same tag
- Configuring appengine-web.xml
- How to prevent Eclipse to use a specific view for a file
- On Eclipse, is there a way to modify several include paths in one shot?
- Adding a file to the class path
- Which Eclipse Download?
- Eclipse issue with F3, F4 keys in Windows 8
- Shortcut key to Snippet in eclipse
- I am getting error in eclipse while installing ObjectAid
- Can't figure out the error Luhn check
- Location to add view files: SPRING MVC
- What is the difference between "Run As Android Application" and "Debug As Android Application"?
- how to get neo4j Graph database in GWT with eclipse running
- Change multiple character in a string C++
- javax.naming.NameNotFoundException while debugging in Eclipse
- Zooming in Eclipse GEF to specific location
- How to show scala doc from Java Editor in Eclipse?
- Gradle implementation not importing gradle module into gradle project
- Can Eclipse C++ indexer be turned off on default
- Why does Eclipse 'filter results from view' when searching?
- Multiline search replace with regexp in Eclipse
- eclipse.ini file not present on Mac
- Problem building a Java Rules app in Eclipse
- Eclipse: Cannot run program "make" (in directory "[path is given]")
- Create an individual integer for each ArrayList element?
- Missing file halts boy's first encounter with OGRE3D!
- Difference between connecting and cloning remote git repository
- Choosing allocated letters, menu type
- HTTP Status 404 error in Eclipse using Tomcat
- Installation errors: INSTALL_FAILED_INSUFFICIENT_STORAGE
- Drawing a ball and two cones in OpenGL C++