|Unresolved includes issue [message #991493]
||Wed, 19 December 2012 09:10
| Michael Hofmann
Registered: December 2012
Using Eclipse Juno 4.2.1 and CDT 8.1.1 (or 8.1, doesn't matter), I have persistent unresolved includes issues that mess up the parsing of my C++ files.|
Since the respective include files exist and the paths are correctly listed in the project settings, building is successful. But the resulting marking in my source code (red squiggles all over) is very unfortunate!
- The compiler toolchain used is GCC 4.7. I have added the '-std=c++0x' option in all the projects as well as in the global properties mentioned here: http://www.eclipse.org/forums/index.php/mv/msg/373462/909018/#msg_909018
- I have several Eclipse C++ projects that reference each other. For example, a library called 'A' depends on libraries 'External' and 'B'.
- In the project settings of 'A', the include paths are referenced by relative paths; see attached pictures. (Using absolute paths doesn't change a thing, btw.)
- Looking at the include paths of project A (see attached picture), all include paths marked by yellow folder icons can be expanded to list the folder structure.
The path of include files in project 'A' is marked by a blue folder icon. This corresponds to '../src' in the include path settings. The respective includes can be resolved.
The path of include files in projects 'B' and 'External' are marked by purple folder icons. All these includes can NOT be resolved, although the files clearly exist.
See the third attached picture for an example of what this looks like. Notice the red error markings on the right hand side of my file. Not nice.
'Search for unresolved includes' finds all these allegedly unresolved includes.
'Re-resolve unresolved includes' doesn't seem to do anything.
All other options under the 'Index' context menu seem to do some computation/rebuilding, but don't fix the underlying problem.
What can I do to fix this?
What do the purple folder icons mean? And why are there folders listed in the Includes that cannot be expanded?
Overall I have to say that the user experience of setting this up is quite bad... This should be easy, not needlessly difficult.
Powered by FUDForum
. Page generated in 0.02162 seconds