[Vscode][C++]vscode 编译 多个C++文件

5 篇文章 0 订阅
2 篇文章 0 订阅

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。

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值