【环境配置】Ubuntu 22.04 C++ header file not found using Vim with YouCompleteMe
问题描述
Ubuntu 22.04 C++ header file not found using Vim with YouCompleteMe
给 VIM
安装配置了 YouCompleteMe
插件以后,在包含C++标准库代码时插件提醒报错:
原因分析:
https://github.com/Briancbn/ros_vim_autocomplete/issues/6
It is due to some issue with clangd. Although the default g++ is looking for g++ -11 libraries, clangd looks for the g++ -12 libraries.
https://github.com/clangd/clangd/issues/1394
解决方案:
安装 g++ -12
sudo apt install g++-12