VScode cdoe runner | 您所在的位置:网站首页 › cpp如何生成exe › VScode cdoe runner |
技术实现
将exe导入直接固定位置E:/Cpp/exe/ "code-runner.executorMap": { "cpp": " cd $dir && g++ $fileName -D LOCAL -o E:/Cpp/exe/$fileNameWithoutExt.exe && E:/Cpp/exe/$fileNameWithoutExt.exe", },参考官网也没搞清相对地址的书写方法,然而不经意间的一个尝试让我给搞了出来 "code-runner.executorMap": { "cpp": " cd $dir && g++ $fileName -D LOCAL -o .\\build\\$fileNameWithoutExt.exe && .\\build\\$fileNameWithoutExt.exe", },不使$dir,而是 .\\ 效果如下: 我在用vs code 写c++代码时才发现的这个插件,惊呼nb 好处我就不再介绍 问题: runcode后这个东西非要跑到这里。 很不爽啊, 我建了个build它不往里边去。它成功激起了我的强迫症。 参考 code runner的官方说明后我做出了如下改进 "code-runner.executorMap": { "cpp": " cd $dir && g++ $fileName -D LOCAL -o .\\build\\$fileNameWithoutExt.exe && .\\build\\$fileNameWithoutExt.exe", },利用相对地址实现exe文件存放在build文件下。 |
CopyRight 2018-2019 实验室设备网 版权所有 |