6

Visual Studio C++'s project reference (Accessible in Property Pages/Common Properties/Add New Reference...) feature allows you to use the symbol definitions in one project (e.g. project A a static lib) in another (e.g. project B an executable).

Adding a reference 'automates' adding project A's output directory into project B's Property Pages/Linker/General/Additional Library Dependencies, and adding the name of A's output lib into project B's Property Pages/Linker/Input/Additional Dependencies.

Q: Is there a way to make project B automatically include the include path from project A, e.g. through a macro in project B's Property Pages/C,C++/General/Additional Include Directories?

Thankyou.

Elliot Woods
  • 834
  • 11
  • 20
  • 1
    There is no automatic way to do it. Using macros will let you enter a path relative to the project/solution directory instead of an absolute path. – Agnel Kurian Feb 28 '12 at 05:24

2 Answers2

5

You may want to have a look at Property Sheet.

Camford
  • 770
  • 3
  • 5
1

If I understood your question correct, then you had a similar problem as me. You can find an answer to this related problem here: Get Include Directories for custom build step

Community
  • 1
  • 1
cgart
  • 235
  • 2
  • 8