Author Topic: Additional includes per file?  (Read 3870 times)

Offline brainbug

  • Single posting newcomer
  • *
  • Posts: 2
Additional includes per file?
« 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?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13413
    • Travis build status
Re: Additional includes per file?
« Reply #1 on: July 18, 2010, 12:48:30 pm »
Example please and how you do it in VS/Netbeans?
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]

Offline brainbug

  • Single posting newcomer
  • *
  • Posts: 2
Re: Additional includes per file?
« Reply #2 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.