My program compiles fine, but within Vim (with CoC + clangd) I get the linting error: #include <omp.h> 'omp.h' file not found (clang pp_file_not_found)

I use bear -- make as described in https://clangd.llvm.org/installation.html#project-setup, and it usually works for libraries I'm using. With OpenMP, it creates this file:

    "arguments": [
    "directory": "/home/me/school/cs475/3",
    "file": "/home/me/school/cs475/3/proj03.cpp"

Why does the error happen? What do I need to do to get clang to recognize OpenMP?

  • 1
    Welcome to vi SE. You can always edit your post to add information. Doing so is better than adding a comment to your own post.
    – Friedrich
    May 9, 2023 at 20:31
  • Isn't that rather a question for your bear command what that is? I don't think this is vims responsibility here May 10, 2023 at 9:38
  • Sounds more like CoC/clangd troubleshooting to me
    – D. Ben Knoble
    May 10, 2023 at 16:57


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.