1

I'm trying to set up Emacs for C++ development, with IDE-like features. I installed eglot and have got it working, somewhat. Flymake is drawing red error markers and reporting errors on #include ... lines, but everything compiles fine.

I wonder if these false errors are because I never told it about my compile_commands.json file. I use CMake, and at the root of my project I have a build/binary dir named build-debug. When I run cmake I generate the file, so it's there in build-debug/compile_commands.json.

Is there a way to tell eglot/clangd about this file?

Rob N
  • 547
  • 2
  • 12

1 Answers1

2

The solution is simple: just add a symlink ln -s build-debug/compile_commands.json in your project root.

Ian
  • 1,321
  • 10
  • 12