zoukankan      html  css  js  c++  java
  • vscode 下编译window api

    {
        // See https://go.microsoft.com/fwlink/?LinkId=733558
        // for the documentation about the tasks.json format
        "version": "2.0.0",
        "tasks": [
            {
                "label": "build",
                "type": "shell",
                "command": "C:\Program Files (x86)\Microsoft Visual Studio\2017\BuildTools\MSBuild\15.0\Bin\msbuild",
                "args": [
                    "myapp.vcxproj",
                    "/property:GenerateFullPaths=true",
                    "/t:build",
                    "/p:TargetVersion=Windows10",
                    "/p:TargetPlatformVersion=10.0.17763.0",
                    "/consoleloggerparameters:NoSummary"
                ],
                "group": "build",
                "presentation": {},
                "problemMatcher": "$msCompile"
            },
            {
                "label": "gccbuild",
                "type": "shell",
                "command": "C:\Program Files\mingw-w64\x86_64-8.1.0-win32-seh-rt_v6-rev0\mingw64\bin\gcc",
                "args": [
                    "main.cpp",
                    "-mwindows",
                    "-o my.exe"
                ],
                "group": "build",
                "presentation": {},
                "problemMatcher": [
                    "$gcc"
                ]
            },
            {
                "type": "shell",
                "label": "cl.exe build active file",
                "command": "cl.exe",
                "args": [
                    "/Zi",
                    "/EHsc",
                    "/Fe:",
                    "${fileDirname}\${fileBasenameNoExtension}.exe",
                    "${file}"
                ],
                "problemMatcher": [
                    "$gcc"
                ],
                "group": "build"
            }
        ]
    }

     经过测试,msbuild和mingw-w64下的gcc都可以执行编译,msbuild可以使用node下的windows-build-tools模块来安装,安装过程中会安装msbuild和py。

  • 相关阅读:
    Educational Codeforces Round 80 (Rated for Div. 2)
    2020 CCPC Wannafly Winter Camp
    Codeforces Round #613 (Div. 2)
    Codeforces Round #612 (Div. 2)
    Hello 2020
    Good Bye 2019
    Codeforces Round #590 (Div. 3)
    依赖注入
    Spring 拦截器
    rsync服务端一键安装rsync脚本(非源码)
  • 原文地址:https://www.cnblogs.com/nomarker/p/11512091.html
Copyright © 2011-2022 走看看