无法在 Macos 上构建 wt_4.10.4,在 Wt::AsioWrapper::asio::ip::tcp::resolver::query 上出现错误

问题描述 投票:0回答:1

在 macos 上构建 Wt_4.10.4 时遇到错误。

构建步骤:

%> cd <wt/download/directory>
%> mkdir build
%> cd build
%> cmake ../
%> make -j8

填写 Wt git 项目中描述的标准构建过程:

https://www.webtoolkit.eu/wt/doc/reference/html/InstallationUnix.html

/Users/thomaspeters/Development/C-Projects/wt-4.10.4/src/http/Server.C:334:11: error: object of type 'asio::ip::tcp::resolver::query' (aka 'basic_resolver_query<boost::asio::ip::tcp>') cannot be assigned because its copy assignment operator is implicitly deleted
  334 |     query = Wt::AsioWrapper::asio::ip::tcp::resolver::query(Wt::AsioWrapper::asio::ip::tcp::v6(), address, "http");
      |           ^
/usr/local/include/boost/asio/ip/basic_resolver_query.hpp:225:3: note: copy assignment operator is implicitly deleted because 'basic_resolver_query<boost::asio::ip::tcp>' has a user-declared move constructor
  225 |   basic_resolver_query(basic_resolver_query&& other)
      |   ^
1 warning and 1 error generated.
make[2]: *** [src/http/CMakeFiles/wthttp.dir/Server.C.o] Error 1
make[1]: *** [src/http/CMakeFiles/wthttp.dir/all] Error 2
make: *** [all] Error 2

增强版本:

10-85-00

我使用 ./bootstrap 和 ./b2 install 成功构建并安装了 Boost。

Macos 版本:

ProductName:        macOS
Product Version:     15.0
BuildVersion:       24A5298h

处理器:

2.3 GHz 8-Core Intel Core i9

Wt版本:

wt-4.10.4
macos cmake makefile wt
1个回答
0
投票

有几个简单的步骤可以修复它:

  1. 你必须打开Server.C
  2. 转到334行并替换 查询=... 到 自动新查询 = ....
  3. 然后你需要将所有“query”更改为“new_query”
© www.soinside.com 2019 - 2024. All rights reserved.