Code::Blocks

User forums => General (but related to Code::Blocks) => Topic started by: brainbug on July 18, 2010, 10:41:06 am

Title: Additional includes per file?
Post by: brainbug on July 18, 2010, 10:41:06 am
In our projects we typically want to restrict use of certain headers to specific files. This works in VS and in Netbeans but I have found no way of doing that in Code::Blocks. Is this possible?
Title: Re: Additional includes per file?
Post by: oBFusCATed on July 18, 2010, 12:48:30 pm
Example please and how you do it in VS/Netbeans?
Title: Re: Additional includes per file?
Post by: brainbug on July 20, 2010, 08:53:38 am
We have a modular code structure that only allows source files inside a module to access the private headers in that module other sources are not allowed to access these headers.

In VS you simply right click the source file and select properties. In the "Additional Include Directories" you simply add the header directories you want to use for the file. It works just like adding it to the project except that it only affects one file.