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
- Right-click on your C/C++ project in the Project Explorer.
- Select>Properties</strong>.
- Go to C/C++ General → Paths and Symbols.
Step 2: Add Include Paths
- Select the Includes tab.
- Choose the language (
GNU C
orGNU C++
). - Click Add and enter the path where your header files are located (e.g.,
/home/user/my_headers
). - 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