当我点击一个警告时,我会收到这个消息。这是该案例的屏幕截图。
错误信息如下:无法打开'warning.cpp': 无法读取文件'
![enter image description here](https://istack.dev59.com/BRwkz.webp)
/Users/dimen/code/C++/Users/dimen/code/C++/warning.cpp
'(错误:无法解析不存在的文件'/Users/dimen/code/C++/Users/dimen/code/C++/warning.cpp
')。我的脚本位于/Users/dimen/code/C++/warning.cpp
,因此 VSCode 会重复显示路径。我怀疑代码检查设置可能写错了,但我不确定在哪里进行编辑。另外,使用 Microsoft 的 C/C++ 扩展,并且已经自定义了 tasks.json
,使所有构建都进入 build
文件夹。