Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » Exclude (duplicate) header from project(Question on how to prevent eclipse from including a header in a project)
Exclude (duplicate) header from project [message #1790807] Mon, 18 June 2018 09:08 Go to next message
Félix TREFOU is currently offline Félix TREFOUFriend
Messages: 2
Registered: June 2018
Junior Member
Hi,

I'm facing a problem that i consider as a possible bug.
I'm currently working on an consequent project that i have divided in multiple git repositories.

for each sub-modules, i have a source directory (which i use in my overall project) and others like examples or tests.
When i integrate a sub-module in eclipse, i exclude from build all folders like "examples" "tests" "doc" etc.

I've got a typical file debug.h that is present in all my examples and my overall project.

The problem is when I include "debug.h", eclipse include a debug located in an excluded folder (and not present in my includes parameters) which is the wrong..
if I delete the file the project compile properly!

Here is the files in my project:
index.php/fa/33143/0/

Any idea?
thanks!
  • Attachment: eclipse.png
    (Size: 33.38KB, Downloaded 1750 times)
Re: Exclude (duplicate) header from project [message #1790845 is a reply to message #1790807] Mon, 18 June 2018 23:30 Go to previous messageGo to next message
David VavraFriend
Messages: 1426
Registered: October 2012
Senior Member
What do you mean by "Eclipse includes"?

Eclipse doesn't generally include anything.
It does read files to index them, though.
Is this what you mean?
I expect that wouldn't cause a compile issue.

Do you mean that the file is being included by the compiler during a build?
That would imply that a directory containing the examples is being relayed to the compiler.
Eclipse can only do this when creating a makefile.
And does so usually by using the -I compiler option.
These are set with the Tool Settings dialog
Project --> C/C++ Build --> Settings --> Tool Settings tab
or the dialog at Project --> C/C++ General --> Paths and Symbols --> Includes tab

When you "delete the file", which file is being deleted?

Can you be more specific about what you mean and post evidence of Eclipse doing it?
Say, a build log and whatever makes you think it is happening.

FWIW:
I modified an HelloWorld project with two header files differing only in content with one being hidden.
Then I built the project.
Only the non-hidden one was part of the build.

[Updated on: Mon, 18 June 2018 23:51]

Report message to a moderator

Re: Exclude (duplicate) header from project [message #1790868 is a reply to message #1790845] Tue, 19 June 2018 10:20 Go to previous message
Félix TREFOU is currently offline Félix TREFOUFriend
Messages: 2
Registered: June 2018
Junior Member
Damn I've deleted folder to post screenshots here and now i'm not able to reproduce the problem.

So it's solved for now and I'll came back if problem persist!
Previous Topic:Running an alias before debug runs
Next Topic:Project Creation Performance
Goto Forum:
  


Current Time: Thu Apr 25 07:38:31 GMT 2024

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

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

Back to the top