首页 > 编程语言 > 详细

vscode use cl.exe build C/C++

时间:2021-06-07 09:28:04      阅读:14      评论:0      收藏:0      [点我收藏+]

.vscode/tasks.json

{
  // See https://go.microsoft.com/fwlink/?LinkId=733558
  // for the documentation about the tasks.json format
  "version": "2.0.0",
  "tasks": [
    {
      "label": "my_cmd",
      "type": "shell",
      "windows": {
        "command": "cmd.exe /C ‘D:/dev/tool/vs2019/IDE/Common7/Tools/VsDevCmd.bat && cl.exe /std:c++latest ${fileBasename} /Fe:${fileBasenameNoExtension}‘"
      }
    },
    {
      "label": "my_shell",
      "type": "shell",
      "windows": {
        "command": "powershell.exe -Command \"&{Import-Module \"\"\"D:/dev/tool/vs2019/IDE/Common7/Tools/Microsoft.VisualStudio.DevShell.dll\"\"\"; Enter-VsDevShell b4b5a7e6}; cd ${fileWorkspaceFolder}; cl.exe /std:c++latest ${fileBasename} /Fe:${fileBasenameNoExtension};  \""
      }
    },
    },
  ]
}

vscode use cl.exe build C/C++

原文:https://www.cnblogs.com/ajanuw/p/14857434.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!