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。

  • 相关阅读:
    发送信号控制 nginx
    常用技术搜索关键字
    boost helloworlld
    快速认识boost 数据类型转换
    php helloworld
    标准模板库(STL)学习指南之List容器
    c 可变参数 可变 形参 不确定 (2)
    C宏——智者的利刃,愚者的恶梦!
    boost常用库案例
    c++ 模板
  • 原文地址:https://www.cnblogs.com/nomarker/p/11512091.html
Copyright © 2011-2022 走看看