【问题标题】:Boost asio link errorBoost asio链接错误
【发布时间】:2016-12-22 09:07:46
【问题描述】:

我试图在我的项目中使用 boost asio。 我下载了 boost 1.62,用命令构建它:

b2 toolset=msvc-14.0 address-model=64 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/x64 b2 toolset=msvc-14.0 address-model=32 architecture=x86 link=static threading=multi runtime-link=shared --build-type=minimal stage --stagedir=stage/win32

我已将我的提升包含在Additional Include Directories 中,添加了Additional Library Directories,并添加了

Ws2_32.lib
Mswsock.lib
libboost_system-vc140-mt-gd-1_62.lib
libboost_regex-vc140-mt-gd-1_62.lib

到我的附加依赖项列表。 但是我的带有 boost\asio.hpp 的程序不想编译。

这是我得到的第一个错误:

1>boost_1_62_0\boost\asio\detail\impl\socket_ops.ipp(197):错误 C3861:“GetAcceptExSockaddrs”:找不到标识符 1>boost_1_62_0\boost\asio\detail\impl\socket_ops.ipp(217): 错误 C2065: 'SO_UPDATE_ACCEPT_CONTEXT': 未声明的标识符 1>boost_1_62_0\boost\asio\detail\impl\socket_ops.ipp(1644): 错误 C2065: 'SO_CONNECT_TIME': 未声明的标识符

我不知道我错过了什么,我重新下载并重建了几次 boost...

【问题讨论】:

    标签: boost


    【解决方案1】:

    好吧,我发现boost asio头文件和我项目中的其他库(live555库)之间存在一些冲突。 因此,我通过创建预编译的头文件 (stdafx.h) 摆脱了它们,其中首先放置了 boost 头文件,然后是其他任何东西。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-03
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-10-15
      • 2013-12-21
      相关资源
      最近更新 更多