22
Oct
2013

Configure Eclipse CDT with symbol and include path resolution (Linux GCC toolchain)

After installing Eclipse CDT (Eclipse for C/C++ development) and G++ (GCC for C++) in my Linux Mint distro, I discovered that symbol and include path resolution for C++ couldn’t be done using the Linux GCC toolchain. Although the program was compiling perfectly, the Eclipse analyzer showed everything as missing in the GUI. It was pretty strange because I noticed that manually adding the symbols and include paths to the project (through the project settings) resolved the problem, but the default C++ project using Cross GCC toolchain didn’t need this to be okay.

After looking-at and trying every single-option in the Eclipse preferences, I came to the solution. I’d like to share it because I didn’t find much useful information using Google.

Go to Window -> Preferences -> C/C++ -> New C/C++ Project Wizard -> Makefile Project -> Discovery Options. In the Discovery profile scope dropdown menu select the option Per language. Select GNU C++ in Tools and check the option Automate discovery of paths and symbols.

Now, include paths and symbols are added as part of the CDT GCC built-in Compiler Settings, for the GNU C++ language.

Una respuesta a “Configure Eclipse CDT with symbol and include path resolution (Linux GCC toolchain)”

  1. 23 de Oct, 2013

    Bookmarked, happened to me on the early stages of setting up my development environment for Android (then we switched to IntelliJ and console-based compiling C++, so at last it was not needed). This could have helped me back then.

    By the way, I see that now you’re writing a post in English. What happened?
    (Not because it’s bad, but just because it’s a change)

    Best!

Escribir un comentario