I will mostly talk about MSVS but will mention linux build too.
The common methods to set up the dependency, all done inside project BB
1) specify project dependency in MSVS
2) define include path to cover the header from AA
3) define library path to cover the object file from AA
Suppose project BB uses “things” in project AA. Say a file in BB #-includes a header in AA. I think it's not necessary to have any. This is important when you debug the dependency. You may fail to find any trace of the dependency in any of those places. The file in BB can simply #-include the full/relative path to the header from AA.
http://blogs.msdn.com/b/vcblog/archive/2010/02/16/project-settings-changes-with-vs2010.aspx describes project reference vs project dependency….
….. much more to say.