情况1:提示无法打开 源文件 "string"之类导致无法编译
情况2:能编译,但无法打开这些库文件或标准库使用提示下划红色问题
解决方案:
一、通过工具->选项->跨平台里,在“远程标头IntelliSense管理器”更新下载一下,会从远程服务器下载相关库文件。
二、如果依然无效,通过“浏览”缓存的文件夹列表也没有头文件的话,说明ssh的AllowTcpForwarding被关闭了,你会在“跨平台日志记录”里看到类似这样的提示:
An SSH channel could not be opened. Verify that TCP forwarding is enabled on the server.
1.需要编辑以下文件
vi /etc/ssh/sshd_config
2.找到AllowTcpForwarding默认是被注释掉的,将注释去掉并确保为yes
AllowTcpForwarding yes
3.重启sshd
sudo systemctl restart sshd
4.再次按步骤一更新即可看到下载回来的库文件
参考:
https://blog.csdn.net/weixin_64647426/article/details/135544488