In #include hell - where is my error ?
-
All other #includes pass by intelisense , except "EXAMPLES_COPY.."
Is it possible there is a conflict between "examples" ( works) and "EXAMPLES..." do not work ?
If my "EXAMPLES..." folder is wrong / missing (?) , should I get more /different errors?Help / suggestions would be appreciated.
-
@AnneRanch said in In #include hell - where is my error ?:
All other #includes pass by intelisense
Are you sure ? line 41 there is an error saying
expected "FILENAME" or <FILENAME> -
That error is a result of incomplete #include .
Actually I expected to have something like this
#include "../../EXAMPLES_COPY... to be valid but I never get the "EXAMPLES_COPY " as an options.
That tells me intelisense does not see the folder as valid , hence my error I cannot solve since I get no other error and the folder is added same as others.
I am not sure how to prove that or how to add anther "EXAMPLES_COPY... reference. -
@VRonin IN same folder as the other #includes - which works.
Yes, the line #41 is incomplete code - not an issue.Again - it the folder selection is wrong - should I get some other error?
The folder is referenceed in all three parts of the project - headers . source and forms. -
Apart from the very stupid way on including headers of other libs - there is a space between the
h
and the"
at the front and end in line 42 -
@Christian-Ehrlicher Even with the space removed - intelisese does not give option EXAMPLES_COPY , but both CAT and Examples are OK.
PS I am willing to listen to your "smart way" to use include AFTER this is solved. So far doing it smarter does not lead to solution.
-
@AnneRanch said in In #include hell - where is my error ?:
So far doing it smarter does not lead to solution.
it's not smarter - you simply did it wrong. There path must be correct and yours was obviously not since I doubt you created a file named
chat.h
with a trailing space.And since it's your harddisk you should know where to find your include files, we can't.
-
@Christian-Ehrlicher Perhaps your troubleshooting philosophy is different then mine - and that is OK.
I usually start at the beginning and not at the end.
And double checking the instructions is my favorite too.
The space after the header is odd, but the problem is - and said it multiple times - inteliisese does not "SEE " the EXAMPLES_COPY folder at all.So the problem is bypassed, for now, by providing full path to the headers.
Let's put it on back burner for now.PS
And since it's your harddisk you should know where to find your include files, we can't.And since I am not sure who "we " are - you ( plural ) have as much info as "we / us ".
-
Personally I'd shun anyone who used paths with embedded spaces in any C++ development, or who added long direct path includes in source instead of using the INCLUDE macros correctly.
NEVER NEVER NEVER...and did I mention NEVER? should you use backwards relative or any explicit and absolute paths in your #include.
use INCLUDE={path}:{path} or c++ -I{path} to locate include paths on a different branch than the compilation unit. Let the build system do the heavy lifting and dont eve make your code nonportable by hardcoding include directories.
-
@Kent-Dorfman So why do not you practice what you preach?
Your comments are not helping to solve the problem. Give it a rest. -
@AnneRanch actually there is another wrongly placed space: at the beginning before the
..\..