gpt4 book ai didi

c++ - 错误: C1083: Cannot open include file: 'boost/asio.hpp' : No such file or directory

转载 作者:行者123 更新时间:2023-12-01 18:22:47 29 4
gpt4 key购买 nike

我在Windows 7中使用Qt Creator。当我使用32位VC 2010编译器编译我的项目时,出现错误: 错误:C1083:无法打开包含文件:'boost/asio.hpp':没有这样的文件或 目录

.pro:

LIBS += -L"D:/MDT/boost_1_71_0/libs" - 
llibboost_date_time-vc141-mt-x32-1_71 \
-
L"D:/MDT/boost_1_71_0/libs" -
llibboost_regex-vc141-mt-x32-1_71 \

main.cpp

   #include <boost/asio.hpp>

最佳答案

您需要告诉编译器在哪里查找包含文件。

添加

INCLUDEPATH += <path_to_boost_dir>

到 .pro 文件。在你的情况下它可能会是

INCLUDEPATH += D:/MDT/boost_1_71_0/

关于c++ - 错误: C1083: Cannot open include file: 'boost/asio.hpp' : No such file or directory,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58484347/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com