【发布时间】:2018-04-17 08:28:12
【问题描述】:
我有点困惑,我无法设置 Visual Studio Code 以使用 MSVC 在 Windows 上进行 C++ 开发。在整个网络上,人们都说他们对设置和使用一切的简单性感到非常高兴,但我找不到任何简单的指南;他们中的大多数只是跳过了设置部分,并展示了包括代码完成/智能感知和调试支持在内的一切工作如何。
我已经安装了 Visual Studio 2015 Community Edition(包括调试工具等)、Visual Studio Code 和微软的 C++ 扩展。
接下来我需要做什么?
编辑: 如今,Intellisense 开箱即用,这很棒。但是我的自动生成的 tasks.json 似乎并没有起到构建的作用,它看起来是这样的:
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"taskName": "build",
"type": "process",
"command": "msbuild",
"args": [
// Ask msbuild to generate full paths for file names.
"/property:GenerateFullPaths=true",
"/t:build"
],
"group": "build",
"presentation": {
// Reveal the output only if unrecognized errors occur.
"reveal": "always"
},
// Use the standard MS compiler pattern to detect errors, warnings and infos
"problemMatcher": "$msCompile"
}
]
}
当我运行这个任务时,它似乎无限运行并且只输出到以下内容:
Executing task: msbuild /property:GenerateFullPaths=true /t:build <
有什么想法吗?
【问题讨论】:
-
开始输入代码?