Standard library missing when using CMake to generate compile_commands.json #483
-
Hello! I'm in the process of migrating a project over from old mbed (with PlatformIO) to mbed-ce. So far things are going well, and I am able to build and flash the project just fine with ninja. I use neovim with clangd as my "IDE", which requires a
I had a similar issue before when using PlatformIO, but they have an environment variable called |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
Hello, I remember the MbedStudio and KeilStudio cloud has similar/same issue. Developers said the issue is directly in the clangd, and they were not able to do something with this for 3years. @multiplemonomials any suggestion? BR, Jan |
Beta Was this translation helpful? Give feedback.
-
Looks like the root cause of my issue was clangd (the language server itself) not using gcc-arm's include directories. The solution was manually specifying the gcc-arm include directories in my CompileFlags:
Add:
- -I/usr/local/gcc-arm/arm-none-eabi/include/c++/14.3.1
- -I/usr/local/gcc-arm/arm-none-eabi/include/c++/14.3.1/arm-none-eabi
- -I/usr/local/gcc-arm/arm-none-eabi/include |
Beta Was this translation helpful? Give feedback.
Looks like the root cause of my issue was clangd (the language server itself) not using gcc-arm's include directories. The solution was manually specifying the gcc-arm include directories in my
.clangd
file like this: