question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

cannot include std headers

See original GitHub issue

Hi!

Thanks a lot for this cool extension… However, I am not able to use it properly as it seems. I get an include squiggle when trying to include vector (and subsequently using std::vector). I have made a little minimal reproduction example here /branch clangd. Maybe I am missing something very obvious here. But compile_commands.json are clearly in the path where clangd should be looking for and when pasting this command directly in the terminal all is fine … When trying some other code, the extension seems to work fine as well… I am just not able to include any std headers …

Note that this compile_commands.json was generated by cmake (but I have excluded the CMakeLists.txt from the project in order to make it as minimal as possible). So one would need to adapt some local paths probably.

If this is a user error I would be very happy if someone would show me how to do this properly 😃

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

3reactions
HighCommander4commented, Nov 16, 2020

Does adding --query-driver=/usr/bin/clang++ to the arguments passed to clangd (via vscode’s clangd.arguments setting) help?

0reactions
konradglascommented, Nov 17, 2020

Yeah… this would get a +1 from me definitely … Just fyi. This is by far the best intellisense experience I am having this far and the projects I am working on are fairly large … So again: Thank you 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot include headers in C++ - visual studio - Stack Overflow
I'm using clang++ , and specified --cxx-isystem ${ROOT}/Libraries and it found the #include <gnuplot> header in there no problem. How did you ...
Read more >
Intellisense can't find standard library headers for files in C++ ...
How can I tell Intellisense which search path(s) to use to find header files in a Shared Items project? It seems like Intellisense...
Read more >
Top 10 C++ header file mistakes and how to fix them
Recommendation: Check your header filies by compiling them in isolation via a testMain.cpp that includes nothing but the header file under test.
Read more >
Forcing Visual Studio to Only Use Explicitly Included Headers
I want to make Visual Studio to force me to include headers when I'm using functions from the header, but I can't find...
Read more >
CLion fails to find some of my headers. Where does it search ...
CLion searches through the same places CMake does. Set the include_directories variable in CMake to provide the headers path to the IDE.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found