Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Unresolved includes issue
Unresolved includes issue [message #991493] Wed, 19 December 2012 14:10 Go to next message
Michael Hofmann is currently offline Michael Hofmann
Messages: 9
Registered: December 2012
Junior Member
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 setup:

- 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.)

index.php/fa/12745/0/

- 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.

index.php/fa/12746/0/

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.

index.php/fa/12747/0/

'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. Sad
icon5.gif  Re: Unresolved includes issue [message #996527 is a reply to message #991493] Wed, 02 January 2013 09:45 Go to previous messageGo to next message
Michael Hofmann is currently offline Michael Hofmann
Messages: 9
Registered: December 2012
Junior Member
*bump*
Does anyone have any idea about what's going on here and how I can fix these issues?

I can't be the only one trying to use GCC 4.7/C++11 on multiple libraries with the latest CDT release... and I'm probably not the only one with include issues.
Re: Unresolved includes issue [message #996604 is a reply to message #996527] Wed, 02 January 2013 13:58 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew Gvozdev
Messages: 255
Registered: July 2009
Senior Member
What do you see in project properties under C/C++ General->Preprocessor Include Paths -> CDT Managed Build Setting Entries?
Re: Unresolved includes issue [message #997161 is a reply to message #996604] Fri, 04 January 2013 08:40 Go to previous messageGo to next message
Michael Hofmann is currently offline Michael Hofmann
Messages: 9
Registered: December 2012
Junior Member
I can see (among other directories) the same include directories that I set in the "GCC C++ Compiler" -> "Includes" panel. They just have one "../" level less, i.e. they are:

src
../B/src
../External/src
../boost_1_50_0
[etc.]

It also says that "Setting entries for this provider are supplied by the system and are not editable."

Of course I had tried playing with the relative paths, i.e. adding or removing relative paths, or adding multiple variants, or even adding absolute paths! Doesn't help.

The settings in the "Includes" panel must be seen relative to the "Debug" or "Release" directories of project A. At least only then project A will compile.
The directories in the "Preprocessor Include Paths" panel must then be seen from the project directory of project A itself (i.e. not from "Debug" or "Release") - otherwise I have no explanation for the discrepancy.
Re: Unresolved includes issue [message #997317 is a reply to message #997161] Sat, 05 January 2013 17:18 Go to previous messageGo to next message
Andrew Gvozdev is currently offline Andrew Gvozdev
Messages: 255
Registered: July 2009
Senior Member
This is bug in CDT and it should be fixed in latest build. Please, update from juno nightly build site http://download.eclipse.org/tools/cdt/builds/juno/nightly
Re: Unresolved includes issue [message #997392 is a reply to message #997317] Mon, 07 January 2013 09:43 Go to previous messageGo to next message
Michael Hofmann is currently offline Michael Hofmann
Messages: 9
Registered: December 2012
Junior Member
Thanks, do you have a link to the submitted bug page?

Unfortunately the nightly build link doesn't work for me (404 File not found), so I tried looking for the correct link. I only found http://download.eclipse.org/tools/cdt/builds/ (coming from http://www.eclipse.org/cdt/developers.php), and both pages don't seem to be updated properly. The developer page even offers me to download a beta of CDT 7.0. Sad The nightly build page only links to a build of 8.0.0.
Do you have a link to an updated nightly build?
Re: Unresolved includes issue [message #997442 is a reply to message #997392] Mon, 07 January 2013 14:34 Go to previous message
Andrew Gvozdev is currently offline Andrew Gvozdev
Messages: 255
Registered: July 2009
Senior Member
This is a link to an update site, not for a browser. In eclipse, select Help->Install New Software, paste the link and press Enter. The contents will show after a short pause.
Previous Topic:Eclipse Fails to start
Next Topic:How to set default breakpoint properties?
Goto Forum:
  


Current Time: Sun Oct 26 03:54:45 GMT 2014

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

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