Sysprogs forums › Forums › VisualGDB › Automatic Include Path Discovery stuck
Tagged: #include_next
- This topic has 5 replies, 2 voices, and was last updated 4 years, 5 months ago by support.
-
AuthorPosts
-
November 20, 2019 at 16:36 #26509TFParticipant
Hi,
we use VisualGDB to develop a Linux application.
We allways have some struggle with the “Found x additional include directories …” messages.
If we press the button to add a directory, it will be added successfully, <span lang=”en” tabindex=”0″>but the message will not disappear.</span>
While using CMake settings, we changed the local and remote build IntelliSense settings to use the “Linux Source Cache Manager”. This solved the issue.
Now we switched to the new MSBuild settings and the option “IntelliSense Directories” disapears if local build is selected.
I discoverd the following:
The problematic header files are allways included with “#include_next”.
I attached a screenshot where I #include <cstdlib>. Pushing the “Add…” button will result in the discribed behavior.
If I go to the definition of cstdlib I find #include_next <stdlib.h>
If I include <stdlib.h> instaed of <cstdlib> <span lang=”en” tabindex=”0″>everything </span>is fine and no message appears.
Same with <cmath> and <math.h>.
I think it is a bug related to the Automatic Include Path Discovery function of VisualGDB.
For now I will exclude the affected headers from this function, but it would be nice, if there is a proper solution…
Kind reagards
Attachments:
You must be logged in to view attached files.November 22, 2019 at 22:49 #26541supportKeymasterHi,
No problem. We have reproduced and fixed the problem. Please try this build: VisualGDB-5.5.2.3395.msi
November 25, 2019 at 12:20 #26545TFParticipantHi,
after installing the update and adding the include directories with the Automatic Include Path Discovery function,
I had to modifie the “Include Directories” in the project settings to map all #includes in the project.
But now everything seems to work fine.
Thank you for the quick fix!
November 25, 2019 at 16:41 #26547supportKeymasterHi,
Good to know it works.
Not sure what you meant by mapping all #includes. Normally, this could happen automatically. If you believe it doesn’t, feel free to describe the repro steps starting from creating a project and we will investigate this further.
November 26, 2019 at 09:18 #26559TFParticipantHi,
for example the Automatic Include Path Discovery function includes
…/usr/include/c++/6 and …/usr/include/c++/6/tr1;
This caused hundreds of IntelliSense errors.
I changed it to
…/usr/include/c++/8
and now IntelliSense and build (remote and local) works.
Thank you, there is no need for forther investigation.
Just wrote this, if someone has similar problems…
Kind regards
November 26, 2019 at 17:37 #26567supportKeymasterThanks for clarifying this. Normally, VisualGDB should automatically detect the /usr/include/c++/8 directory after querying your toolchain, so you wouldn’t need to specify this directory manually. If you ever find the manual setup too annoying, feel free to get back to us and we will help you get the fully automatic setup to work correctly.
-
AuthorPosts
- You must be logged in to reply to this topic.