By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,785 Members | 2,074 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,785 IT Pros & Developers. It's quick & easy.

Eclipse CDT search entire project for includes

P: 7
Hi all,

I recently started using eclipse indigo with CDT 8.0 to edit a C++ project. However, whenever i try to build the project it complains that includes cannot be found. The src folder has many subfolders, and some of them have subfolders. The problem apparently is that the compiler does not look in other subfolders for matches for include statements. Since I would rather not edit all include statements to have the full path or add all subfolders in the include directories in the properties, I was wondering if there is an option to instruct the compiler to search the entire project. Also, shouldn't it be doing this already?

thanks.
Sep 11 '11 #1
Share this Question
Share on Google+
3 Replies


Banfa
Expert Mod 5K+
P: 8,916
Right click your on your project in the tree (project explorer) and select properties.

Select "C++ General" -> "Paths and Symbols"

The first tab, already selected, is the "includes" tab where you can enter your include directories.
Sep 12 '11 #2

P: 7
I know, but why do I have to specify the subfolders of the project itself? There are quite a lot of them. Can't eclipse search the subfolders of the project on it's own? Do I really have to include all of them manually?
Oct 11 '11 #3

Banfa
Expert Mod 5K+
P: 8,916
No it is quite normal in a C++ environment for you to have to specify your include directories explicitly.
Oct 12 '11 #4

Post your reply

Sign in to post your reply or Sign up for a free account.