https://askubuntu.com/questions/1032647/how-can-i-compile-c-files-through-visual-studio-code
使用make来编译多个代码,不过make只在Linux下支持
https://blog.csdn.net/qq_31359295/article/details/75113078
"cpp": "g++ -std=c++11 $fileName ./sub1/*.cpp -o my.exe ; ./my.exe",
VSCODE 右上角那个三角号是code runer的,点击小三角号后,运行的指令:
在file-->perference--->settings
在json中添加
"code-runner.executorMap": {
"cpp": "g++ -std=c++11 $fileName ./sub1/*.cpp -o my.exe",
},
code-runner vs 编译
右上角三角,配置在code-runner.executorMap
编译,CTRL shift B,依赖task.json
脚本中 && 不识别的问题
换成 ; 分号,即可
https://stackoverflow.com/questions/6312004/equivalent-in-powershell
将vscode终端改为 git bash,注意是bash.exe的终端,而不是git-bash.exe
https://www.jianshu.com/p/efa734089206
优点,bash.exe可以有powershell的功能,显示结果,响应指令,如ls。

本文详细介绍了如何在Visual Studio Code中配置C++编译环境,包括使用make在Linux下编译多个代码文件,以及如何通过修改settings.json中的code-runner.executorMap来定制编译命令。同时,文中还提供了解决脚本中&&不识别问题的方法,即将其替换为分号;并指导如何将VSCode终端更改为gitbash以利用更多功能。

3593

被折叠的 条评论
为什么被折叠?



