Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Header path correct but "File not Found"(Project settings )
Header path correct but "File not Found" [message #1862233] Mon, 20 November 2023 03:14 Go to next message
Keith Bradley is currently offline Keith BradleyFriend
Messages: 1
Registered: November 2023
Junior Member
I created a new C managed project.
I imported working software that builds with no errors on a command line.

Problem is when I build in Eclipse ..
.. I get "file not found" for the 1st header:

#include "Folder/Header.h"

Since the gcc command line shows it is run from a build folder (Debug in this case) ..
.. if I edit to this:

#include "../Folder/Header.h"

.. it finds that one and errors on the next.

I modified the C/C++ General - Paths and Symbols - includes (GNC) to have:


.. but no joy.

What is the correct folder hierarchy to make this work?

Re: Header path correct but "File not Found" [message #1862308 is a reply to message #1862233] Thu, 23 November 2023 18:33 Go to previous message
Greg Willits is currently offline Greg WillitsFriend
Messages: 6
Registered: March 2020
Junior Member
I don't know about includes with the folder paths already in them, but for includes with no paths you have to manually add include paths in the project properties.

Right click the project in Project Explorer. At the bottom of the menu, select Properties.

Then open C/C++ Build > Settings. Select the Tool Settings tab, open GCC C Compiler (assuming that's what you have) and select Includes.

Use the page [+] button to add paths from your project.

I don't know why these can't be scanned (I've used other Eclipsed based tools which automatically included project folders), but the native CDT requires doing this manually.

So, even if you have some folder paths in your #includes, you might need the project root folder, or some others defined this way.
Previous Topic:Ctrl click variable reference/hyperlinks, right click menu
Next Topic:Function Def Not Found, Possible Header File Path Prob
Goto Forum:

Current Time: Wed Dec 06 15:28:40 GMT 2023

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

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

Back to the top