Note that there are some explanatory texts on larger screens.

plurals
  1. POEclipse Juno with CDT Doesn't Add Built-in Include Directories
    primarykey
    data
    text
    <p>Since I upgraded from Eclipse Indigo to Juno (on Ubuntu 12.04), I've been having the problem where it shows "unresolved inclusion" errors for standard libraries (e.g. next to <code>#include &lt;iostream&gt;</code> and <code>#include &lt;vector&gt;</code>, etc.), although the program builds and runs fine (using g++). This only occurs in new projects created with Juno, not old ones from Indigo in my workspace.</p> <p>Thanks to several other SO questions (see below*), I was able to trace the source of the problem to the absence of the "built-in values" in a project's Properties > C/C++ General > Paths and Symbols > Includes tab: </p> <pre><code>/usr/include/c++/4.6 /usr/include/c++/4.6/x86_64-linux-gnu /usr/include/c++/4.6/backward /usr/lib/gcc/x86_64-linux-gnu/4.6/include /usr/lib/gcc/x86_64-linux-gnu/4.6/include-fixed /usr/include/x86_64-linux-gnu /usr/include </code></pre> <p>are present when the "Show built-in values" checkbox is ticked in my old Indigo projects that didn't have this problem, but are absent in my new projects created with Juno. Sure enough, if I add these seven directories manually to the Includes tab in a project's settings, the problem disappears. But I don't want to have to do this manually for every new project I create. Is there a reason this is no longer the default in Juno, and is there a way to restore it? </p> <p>*Other SO questions with similar issues I have consulted but did not solve my problem:</p> <ul> <li><a href="https://stackoverflow.com/questions/7962655/eclipse-3-7-0-indigo-with-cdt-shows-many-false-compilation-errors">Eclipse 3.7.0 Indigo with CDT shows many false compilation errors</a>: I thought Erzsébet Geréb's answer would be my solution -- in Juno, if I create a new C++ project with "Project type" as one of the categories under "GNU Autotools" instead of "Executable," the built-in directories are there. (In Indigo, there's no GNU Autotools category. If I created it in Indigo as an empty or Hello World project under "Executable," those directories are there, but they're not if I do it that way in Juno -- I have to pick an option under "GNU Autotools.") But then, with a "GNU Autotools" project, when I go to the project's Properties > C/C++ Build > Settings, the "Tool Settings" tab is no longer present and I am unable to add include paths for the GCC C++ Compiler and libraries for the GCC C++ Linker, which I need to do because many of my C++ projects use OpenCV libraries. </li> <li><a href="https://stackoverflow.com/questions/9337757/unresolved-inclusion-stdio-h">&quot;Unresolved inclusion&quot; error with Eclipse CDT for C standard library headers</a>: Told me how to add the include paths manually, but not how to have the built-in ones added by default</li> <li><a href="https://stackoverflow.com/questions/6980186/error-symbol-vector-could-not-be-resolved">error , Symbol &#39;vector&#39; could not be resolved</a>: Cleaning <code>~/.eclipse/</code> and rebuilding index didn't help.</li> <li><a href="https://stackoverflow.com/questions/9864003/eclipse-cdt-builtin-include-directories">Eclipse CDT Builtin Include Directories</a>: Discovery Options are set the same as my projects that do work properly.</li> <li><a href="https://stackoverflow.com/questions/8291993/eclipse-cdt-8-01-default-paths-libstdc-libstdc-totally-disappeared-in-inc">eclipse CDT 8.01 - default paths (libstdc,libstdc++) totally disappeared in &#39;includes&#39; directory</a></li> <li><a href="https://stackoverflow.com/questions/8144751/eclipse-cdt-indexer-lost-after-system-update">Eclipse CDT indexer lost after system update</a>: Doesn't solve the problem for all new projects.</li> </ul>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload