Intellisense finding errors that don't exist #9883
Unanswered
jalanh11640
asked this question in
Q&A
Replies: 2 comments
-
includePaths that end with "**" (recursive includes), get moved to the bottom of the non-recursive ones, so you're getting /home/jeff/build/include being used after /release/include, which doesn't match what you're building with. If the order matters, you should add /home/jeff/build/include as a non-recursive include (or ${workspaceFolder}/include). |
Beta Was this translation helpful? Give feedback.
0 replies
-
Thanks for the insight. Sounds like I only have the one option.On Sep 16, 2022, at 10:25 PM, Sean McManus ***@***.***> wrote:
includePaths that end with "**" (recursive includes), get moved to the bottom of the non-recursive ones, so you're getting /home/jeff/build/include being used after /release/include, which doesn't match what you're building with. If the order matters, you should add /home/jeff/build/include as a non-recursive include (or ${workspaceFolder}/include).
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm running into an issue where Intellisense is detecting errors that don't exist. I'm hoping someone can help me determine if there's a problem in my setup that is causing this.
For reference, this is my includePath from c_cpp_properties.json
"includePath": [
"${workspaceFolder}/**",
"/home/jeff/release/include"
],
My directory structure looks like this.. where ${workspaceFolder} = /home/jeff/build
/home/jeff/release/include/test.hpp
/home/jeff/build/include/test.hpp (usually identical to the release/include/test.hpp)
/home/jeff/build/test.cpp
If I decide to modify the local test.hpp, intellisense seems to pick up the 'release/include/test.hpp version and tells me there are errors. Compiling the code with 'g++ -c test.cpp -I include -I /home/jeff/release/include' works without any errors.
I've tried swapping the two paths in the 'includePath' and that doesn't seem to change anything. I did find that if I add 'include' to my includePath before the '/home/jeff/release/include entry', the errors go away. The problem with this is that this example is a simple example of my workflow.. I may have many different local 'include' directories.. adding each of them individually for every workspace I have would be less than ideal.
Is there a more generalized fix for this problem?
Thanks for any suggestions,
Jeff
Beta Was this translation helpful? Give feedback.
All reactions