当尝试在Visual 2022中构建C++项目时,我得到:
无法打开包含文件:'boost/asio.hpp':没有这样的文件或目录
包括引起错误的行:
#include <boost/asio.hpp>但是,我确实已经通过附加的包含目录包括了这个文件的路径。

在我的用户桌面目录中,x64-windows\include文件夹包含boost文件夹,其中包含包含的asio.hpp文件。它还包含asio文件夹。
编辑:将<boost/asio.hpp>更改为"boost/asio.hpp"没有帮助。
发布于 2022-02-21 15:44:02
这个帮我修好了:
.\\vcpkg.exe 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.现在,该项目编译没有任何问题。
https://stackoverflow.com/questions/71208519
复制相似问题