Your solution with #include "../xh" will work. As for poor design - perhaps this is so; it's hard to say without knowing more about your code.
Note that if you have many paths included, the compiler / preprocessor will look for ../xh - all of which may be unintentional and too wide!
Suppose you have the following directory structure, and Your_Code is in the search path for include files.
Unrelated_Directory/ xh - unrelated Your_Code/ libA/ xh - the real one algorithm/ ah
This is dangerous. If you delete / rename your real xh , the compiler will quietly select Your_Code/../xh , which contains unrelated things - this can lead to cryptic error messages. Or, even worse, it might be an old version full of bugs!
anatolyg
source share