在 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
有几个简单的步骤可以修复它: