赞
踩
1.添加项目根目录下./vscode/c_cpp_properties.json中的includepath
参考:【VS code找不到头文件】成功解决 (检测到Include错误,请更新includePath)(明明有头文件,却找不到)_vscode找不到include-CSDN博客
2.在项目根目录下./vscode/tasks.json中,"args"参数添加-l参数,
例如:
重启vscode生效!!!!!!
需要添加多个路径这样写:
- "args": [
- "-g",
- "${file}",
- "-o",
- "${fileDirname}\\${fileBasenameNoExtension}.exe",
- "-I",
- "${workspaceFolder}\\include",
- "-I",
- "${workspaceFolder}\\AnotherDirectory\\include"
- ]
参考:
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。