Help OF with (adding ) "include" path ....
-
Could somebody nice tell me HOW TO ADD #INCLUDE WHEN IT IS not IN SAME pew / directory?
Here is an example - I need to add #include to class file in project TEST_MAIN and add a path to get to the project btscanner.
I know how to use "..." but I have NEVER fully understood how it works. So I am asking for advise how to ADD path to "include" . preferably using intelisense. ( Let the intelisense guide me... ) or just drag the path - from where...
I sort of understand how it works, but looking for easy way to implement / add the path.

-
@fcarney Good idea , but
it really does not answer my inquiry about the usage of ".../" - got a good reply in another forum...
would be OK if I needed multiple access to same path - do not need that feature
would defeat the philosophy to keep related stuff physically together
Thanks
Cheers -
..is just a part of a path meaning "one folder up". So you build your path just as you would "click it" in file explorer.
Lets say you have a file structure like this:top project1 something header.h project2 something file.cppand you want to include header1 in file.cpp. When starting from file.cpp location in a file explorer you would go two directories up and then two directories down to header.h.
It's the same when constructing an include path. You start where the file you are in is. You go up twice and then down twice to the header, so:
#include "../../project1/something/header.h"start in
top/project2/something/because that's where file.cpp is
first..takes you one up totop/project2/
second..takes you up totop/
and thenproject1/something/takes you to the header.But as @fcarney said that's not a good idea because you're hardcoding in your source a path to another project. That's not something you should do. What you should do is add a base path to the other project to your INCLUDEPATH variable and then you can make includes relative to that. So in the above example you would add path to project1 in project2 like this:
INCLUDEPATH += ../project1and then you could make a clean include like this in your file.cpp:#include "something/header.h".