You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
From version 1.84.0, the boost::winapi changed its BOOST_USE_WINAPI_VERSION default value to BOOST_WINAPI_VERSION_WIN10 (0x0A00) when _WIN32_WINNT is undefined. Check here
This makes boost::log build with a different namespace since version 1.84.0 Check here
Since winapi sets BOOST_USE_WINAPI_VERSION according to _WIN32_WINNT and asio sets _WIN32_WINNT to 0x0601 by default Check here
If asio is included before log, the application including boost::log will try to find symbols for boost::log in the wrong namespace.
Therefore, the headers are misinterpreted and doesn't correspond to the build boost log. Thus, link step fails and developer may find error messages like the following: error LNK2038: mismatch detected for 'boost_log_abi': value 'v2s_mt_nt6' doesn't match value 'v2s_mt_nt62' error LNK2001: unresolved external symbol "public: static void __cdecl boost::log::v2s_mt_nt6::record_view::public_data::destroy(struct boost::log::v2s_mt_nt6::record_view::public_data const *)" (?destroy@public_data@record_view@v2s_mt_nt6@log@boost@@SAXPEBU12345@@Z)
Workaround:
Set the compiler definition of _WIN32_WINNT to any >= 0x0602, like 0x0A00 (the one corresponding to Windows 10).
The text was updated successfully, but these errors were encountered:
lucaskdc
changed the title
Including boost::asio lead to link failure to boost::log due boost::winapi mismatch
Including boost::asio lead to link failure to boost::log due _WIN32_WINNT mismatch
Sep 14, 2024
lucaskdc
changed the title
Including boost::asio lead to link failure to boost::log due _WIN32_WINNT mismatch
Including boost::asio leads to link failure to boost::log due _WIN32_WINNT mismatch
Sep 14, 2024
From version 1.84.0, the boost::winapi changed its BOOST_USE_WINAPI_VERSION default value to BOOST_WINAPI_VERSION_WIN10 (0x0A00) when _WIN32_WINNT is undefined. Check here
This makes boost::log build with a different namespace since version 1.84.0 Check here
Since winapi sets BOOST_USE_WINAPI_VERSION according to _WIN32_WINNT and asio sets _WIN32_WINNT to 0x0601 by default
Check here
If asio is included before log, the application including boost::log will try to find symbols for boost::log in the wrong namespace.
Therefore, the headers are misinterpreted and doesn't correspond to the build boost log. Thus, link step fails and developer may find error messages like the following:
error LNK2038: mismatch detected for 'boost_log_abi': value 'v2s_mt_nt6' doesn't match value 'v2s_mt_nt62'
error LNK2001: unresolved external symbol "public: static void __cdecl boost::log::v2s_mt_nt6::record_view::public_data::destroy(struct boost::log::v2s_mt_nt6::record_view::public_data const *)" (?destroy@public_data@record_view@v2s_mt_nt6@log@boost@@SAXPEBU12345@@Z)
Workaround:
Set the compiler definition of _WIN32_WINNT to any >= 0x0602, like 0x0A00 (the one corresponding to Windows 10).
The text was updated successfully, but these errors were encountered: