views:

18

answers:

0

Suppose I have two vc++ project, proj_a and proj_b

proj_a contains a header file a.h

proj_b has dependency on proj_a. It contains file b.h that does #include <a.h>. I add a.h's directory in the "additional include directories" in its project settings to build it.

Now say, I have 100 more projects, whose files #include <b.h>. Only adding b.h's directory in the "additional" column does not work. I have to include the path of a.h too.. How to avoid this?

Simply put, how to keep the number of include paths for any vc++ project equal to the number of direct dependencies?

I don't have the option to set vc++ environment settings to globally include a.h's path since everybody else in my team will have to import my settings and things will turn messier..

I don't have enough idea but is there a way to achieve this through precompiled headers? I think they are project-specific and should not be shared across projects?