【发布时间】:2015-06-03 13:16:02
【问题描述】:
每当我尝试将
目前我在 Windows 8.1 上使用 Code::Blocks、MinGW 编译器(IDE 未捆绑)。
Boost 在 mingw 包含文件夹之外构建,但包含在项目设置中。
我得到的确切错误:
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp||In member function 'void boost::asio::detail::win_object_handle_service::move_construct(boost::asio::deta il::win_object_handle_service::implementation_type&, boost::asio::detail::win_object_handle_service::implementation_type&)':|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp|106|error: '::UnregisterWaitEx' has not been declared|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp||In member function 'void boost::asio::detail::win_object_handle_service::move_assign(boost::asio::detail::win_object_handle_service::implementation_type&, boost::asio::detail::win_object_handle_service&, boost::asio::detail::win_object_handle_service::implementation_type&)':|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp|158|error: '::UnregisterWaitEx' has not been declared|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp||In member function 'void boost::asio::detail::win_object_handle_service::destroy(boost::asio::detail::win_object_handle_service::implementation_type&)':|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp|200|error: '::UnregisterWaitEx' has not been declared|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp||In member function 'boost::system::error_code boost::asio::detail::win_object_handle_service::close(boost::asio::detail::win_object_handle_service::implementation_type&, boost::system::error_code&)':|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp|251|error: '::UnregisterWaitEx' has not been declared|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp||In member function 'boost::system::error_code boost::asio::detail::win_object_handle_service::cancel(boost::asio::detail::win_object_handle_service::implementation_type&, boost::system::error_code&)':|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp|302|error: '::UnregisterWaitEx' has not been declared|
boost_1_58_0\boost\asio\detail\impl\win_object_handle_service.ipp|402|error: '::UnregisterWaitEx' has not been declared|
boost_1_58_0\boost\system\error_code.hpp|221|warning: 'boost::system::posix_category' defined but not used [-Wunused-variable]|
boost_1_58_0\boost\system\error_code.hpp|222|warning: 'boost::system::errno_ecat' defined but not used [-Wunused-variable]|
boost_1_58_0\boost\system\error_code.hpp|223|warning: 'boost::system::native_ecat' defined but not used [-Wunused-variable]|
boost_1_58_0\boost\asio\error.hpp|258|warning: 'boost::asio::error::system_category' defined but not used [-Wunused-variable]|
boost_1_58_0\boost\asio\error.hpp|260|warning: 'boost::asio::error::netdb_category' defined but not used [-Wunused-variable]|
boost_1_58_0\boost\asio\error.hpp|262|warning: 'boost::asio::error::addrinfo_category' defined but not used [-Wunused-variable]|
boost_1_58_0\boost\asio\error.hpp|264|warning: 'boost::asio::error::misc_category' defined but not used [-Wunused-variable]|
boost_1_58_0\boost\asio\detail\winsock_init.hpp|116|warning: 'boost::asio::detail::winsock_init_instance' defined but not used [-Wunused-variable]|
我尝试过的:
- 将 _WIN32_WINNT 设置为 0x0601(仅添加了一个警告)
- 按照here 中的说明将 struct pollfd 添加到 winsock2.h(没有任何反应)
- 链接的 boost 正则表达式、系统和线程库(或至少尝试过)
提前致谢,
尼克
【问题讨论】:
标签: c++ boost mingw boost-asio codeblocks