User forums > Using Code::Blocks

Project dependencies: How do I include a header from a dpeneded on project.

(1/1)

indigo0086:
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

thomas:
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.

MortenMacFly:

--- Quote from: thomas on January 25, 2008, 06:40:47 pm ---What you want to do to solve your problem is to add A's include directory to B's project.

--- End quote ---
THOMAS! Be careful with your next post! It'll be #3000! ;-) :lol: :lol:

thomas:

--- Quote from: MortenMacFly on January 25, 2008, 08:31:57 pm ---
--- Quote from: thomas on January 25, 2008, 06:40:47 pm ---What you want to do to solve your problem is to add A's include directory to B's project.

--- End quote ---
THOMAS! Be careful with your next post! It'll be #3000! ;-) :lol: :lol:

--- End quote ---
If that's a problem, I can always change my post count to 4000 :)

Navigation

[0] Message Index

Go to full version