【发布时间】:2021-05-27 05:25:40
【问题描述】:
我正在尝试像this Video 一样构建Supertux-C++-Project。
我为 C++ 和 CMake 安装了 VS Code 扩展,并且我正在使用 GCC 编译器。我克隆了 VCPKG-Repository 并执行了bootstrap-vcpkg.bat。之后我跑./vcpkg integrate install得到消息:
为此 vcpkg 根应用了用户范围的集成。
.vscode\settings.json 看起来像:
{
"cmake.configureSettings": {
"CMAKE_TOOLCHAIN_FILE": "D:/_programming/_repos/vcpkg/scripts/buildsystems/vcpkg.cmake",
"VCPKG_BUILD": "ON",
}
}
然后我在我的 Supertux-Project-Folder 中创建了一个 vcpkg.json 文件并插入了必要的库:
{
"name": "supertux-example",
"version": "0.0.1",
"dependencies": [
"sdl2",
"sdl2-image",
"openal-soft",
"curl",
"libogg",
"libvorbis",
"freetype",
"glew",
"boost-date-time",
"boost-filesystem",
"boost-format",
"boost-locale",
"boost-system"
]
}
现在我正在尝试使用以下命令访问所有这些库:D:\_programming\_repos\vcpkg\vcpkg.exe install --triplet "x64-windows" --binarycaching,但我收到以下错误消息:
Warning: manifest-root detected at D:/_programming/cpp/supertux, but manifests are not enabled.
If you wish to use manifest mode, you may do one of the following:
* Add the `manifests` feature flag to the comma-separated environment
variable `VCPKG_FEATURE_FLAGS`.
* Add the `manifests` feature flag to the `--feature-flags` option.
* Pass your manifest directory to the `--x-manifest-root` option.
If you wish to silence this error and use classic mode, you can:
* Add the `-manifests` feature flag to `VCPKG_FEATURE_FLAGS`.
* Add the `-manifests` feature flag to `--feature-flags`.
Error: 'install' requires at least 1 arguments, but 0 were provided
谁能告诉我如何激活清单模式并解释这个错误的具体原因? (我没有太多在 C++ 项目中使用外部库的经验。)
【问题讨论】:
标签: c++ visual-studio-code cmake manifest vcpkg