我做到了vcpkg install mman.h && vcpkg integrate install
。
现在 VSCode 中的默认 C\CPP Linter 会看到该头文件,但编译器不会。
我的 tasks.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>
。