Emacs – LSP compile_command.json file?

  archlinux, c++, emacs-lsp, opencv

I m in Arcolinux guyz, I am using clang-lsp in my Emacs.

I m new to programming but I need to prepare a project about Opencv(C++). Whenever I try a script , there is always warning like #include <opencv2/opencv.hpp> file not found ? I have found some things in the internet like command_compile.json but they all uses cmake, when I try to do that, I got following error:

cmake -DCMAKE_EXPORT_COMPILE_COMMDANS=ON /usr/include/opencv4/opencv2/
CMake Error: The source directory "/usr/include/opencv4/opencv2" does not appear to contain CMakeLists.txt.

Can anyone help me ? it is really annoying.

One more question:

My opencv folder is in /usr/include/opencv4/opencv2/ , but my project folder is in ~/Projects/opencv++/

Thanks for attention.

Regards.

Source: Windows Questions C++

LEAVE A COMMENT