clangd: Eclipse indexer unable to find std or the first C++ include in files

I am running Eclipse version 2023-09 (4.29.0) and have the Espressif ESP-IDF plugin version 2.11.1.202310270725 installed.

I installed the clangd indexer and disabled the default indexer per the instructions at this link. The installation of the clangd indexer went smoothly, but to get it to take effect, I had to delete my project and re-import it.

My first problem with the indexer is that it seems to have trouble finding standard C++ headers. It says “Use of undeclared identifier ‘std’” when I reference an std library method.

287558749-19127799-47f2-4690-b5d0-2abd93f71989

It also claims it can’t find the string header file as indicated below. I noticed that this happens with the first #include in the file. So if I first #include <memory> then #include <string> it will indicate memory cannot be found but it finds string. Weird.

287558830-9ceb44a1-2fec-41ac-9ecd-08874bcbc5c4

FInally, I also don’t see any context menu commands for “Open declaration”. The other indexer supported it. Is that feature unavailable with the clangd indexer?

I’ve attached the Eclipse log. eclipse.log

About this issue

  • Original URL
  • State: closed
  • Created 7 months ago
  • Comments: 17

Most upvoted comments

Thanks @HighCommander4 that all seems to have cleared up the problem!