Andrei Pall

Linux Software Engineering

How to Configure Include Paths in Eclipse CDT

If Eclipse CDT (C/C++ Development Tooling) doesn't recognize your header files for autocomplete, indexing, or compilation, you need to configure the include paths.

Step 1: Open Project Properties

  1. Right-click on your C/C++ project in the Project Explorer.
  2. Select>Properties</strong>.
  3. Go to C/C++ GeneralPaths and Symbols.

Step 2: Add Include Paths

  1. Select the Includes tab.
  2. Choose the language (GNU C or GNU C++).
  3. Click Add and enter the path where your header files are located (e.g., /home/user/my_headers).
  4. Click OK and Apply and Close.

Tip: If your project uses pkg-config, you can find the correct include paths with:

pkg-config --cflags your-library