Author Topic: Project dependencies: How do I include a header from a dpeneded on project.  (Read 4804 times)

Offline indigo0086

  • Almost regular
  • **
  • Posts: 150
I have project A which is a small dll library that I'm using in project B.  I have project b set so that it depends on A.

When I try to #include "A.h" into my project it says it cannot find it (No such file or directory).  I thought when you set the dependency it does all the inclusion directories for you

They are in a directory structure as follows

Main Workspace folder
 |_A
     |_A.h, A.cpp
 |_B
     |_B.cpp

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
What the dependencies do is recompiling B if the binary of A has changed.

What you want to do to solve your problem is to add A's include directory to B's project.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

Offline MortenMacFly

  • Administrator
  • Lives here!
  • *****
  • Posts: 9723
What you want to do to solve your problem is to add A's include directory to B's project.
THOMAS! Be careful with your next post! It'll be #3000! ;-) :lol: :lol:
Compiler logging: Settings->Compiler & Debugger->tab "Other"->Compiler logging="Full command line"
C::B Manual: https://www.codeblocks.org/docs/main_codeblocks_en.html
C::B FAQ: https://wiki.codeblocks.org/index.php?title=FAQ

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
What you want to do to solve your problem is to add A's include directory to B's project.
THOMAS! Be careful with your next post! It'll be #3000! ;-) :lol: :lol:
If that's a problem, I can always change my post count to 4000 :)
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."