News:

The new Release 25.03 is out! You can download binaries for Windows and many major Linux distros here .

Main Menu

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

Started by indigo0086, January 25, 2008, 05:18:30 PM

Previous topic - Next topic

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.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."

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.
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: [url="https://www.codeblocks.org/docs/main_codeblocks_en.html"]https://www.codeblocks.org/docs/main_codeblocks_en.html[/url]
C::B FAQ: [url="https://wiki.codeblocks.org/index.php?title=FAQ"]https://wiki.codeblocks.org/index.php?title=FAQ[/url]

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.
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."