写的是here
In Visual Studio, you can create a New Project (or open an existing one). All installed libraries are immediately ready to be #include'd and used in your project without additional configuration.
这在现实中是不正确的。如果我这样做
New Project
并从头开始创建控制台或 CMake 应用程序并包含一些 CGAL(因为我在 vgpkg
中安装了 CGAL)我(显然)收到错误消息,说 CGAL
包括未找到。怎么修?可以将 vcpkg 的路径放在 Visual Studio 中的某个地方吗?
vcpkg integrate install
也没有帮助。D:\dev\vcpkg>vcpkg integrate install
Applied user-wide integration for this vcpkg root.
All MSBuild C++ projects can now #include any installed libraries.
Linking will be handled automatically.
Installing new libraries will make them instantly available.
CMake projects should use: "-DCMAKE_TOOLCHAIN_FILE=D:/dev/vcpkg/scripts/buildsystems/vcpkg.cmake"
它声称它会起作用,但它没有
而且很明显,因为世界上没有魔法。
那么,我忘记了“没有额外配置”还有什么?
最佳答案
这是一个“三元组”问题(设置为 x86 而不是 x64)。麻烦各位了 :)
关于c++ - 现实中如何在 Visual Studio 中使用 vcpkg 安装包?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59865669/