如何在vscode中使用msvc正确包含头文件?

时间:2019-10-23 13:44:29

标签: c visual-studio-code msvc12 vcpkg

我做了vcpkg install mman.h && vcpkg integrate install

现在VSCode中的默认C \ CPP Linter可以看到该头文件,但是编译器没有。

我的task.json文件:

{
    "tasks": [
        {
            "type": "shell",
            "label": "cl.exe build active file",
            "command": "cl.exe",
            "args": [
                "/Zi",
                "/EHsc",
                "/I\\C:\\Users\\ansga\\vcpkg\\packages\\mman_x86-windows\\include\\mman\\sys mmmapTest.c",
                "/Fe:",
                "${fileDirname}\\${fileBasenameNoExtension}.exe",
                "${file}",

            ]
        }
    ],
    "version": "2.0.0"

#include <mman.h>上仍然给我错误。

0 个答案:

没有答案