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
according to 1.84 release notes "Boost.WinAPI, a library that is used internally by other Boost libraries for defining Windows SDK components, has been updated to target Windows 10 API by default, where possible" so initially got lots of linker errors but was able to fix it pretty easily by changing #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN7 to BOOST_WINAPI_VERSION_WIN10 in my own header. but that didn't help with two remaining problems:
boost_log-vc140-mt-gd.lib(event.obj) : error LNK2019: unresolved external symbol WaitOnAddress referenced in function "public: static unsigned int __cdecl boost::atomics::detail::wait_operations_windows<struct boost::atomics::detail::core_operations<4,0,0>,4>::wait(unsigned int const volatile &,unsigned int,enum boost::memory_order)" (?wait@?$wait_operations_windows@U?$core_operations@$03$0A@$0A@@detail@atomics@boost@@$03@detail@atomics@boost@@SAIAEDIIW4memory_order@4@@z)
boost_log-vc140-mt-gd.lib(event.obj) : error LNK2019: unresolved external symbol WakeByAddressSingle referenced in function "public: static void __cdecl boost::atomics::detail::wait_operations_windows<struct boost::atomics::detail::core_operations<4,0,0>,4>::notify_one(unsigned int volatile &)" (?notify_one@?$wait_operations_windows@U?$core_operations@$03$0A@$0A@@detail@atomics@boost@@$03@detail@atomics@boost@@SAXAECI@Z)
it doesn't automatically links to synchronization.lib apparently because there is BOOST_ALL_NO_LIB defined in C:\Project\Libs\vcpkg\installed\x64-windows-static\include\boost\config\user.hpp
after that I was able to fix it by defining #define BOOST_ATOMIC_FORCE_AUTO_LINK 1 in aforementioned header file but wonder whether it's the most appropriate solution and what was the reason to define BOOST_ALL_NO_LIB in the first place. my app is VS based, no cmake there
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
according to 1.84 release notes "Boost.WinAPI, a library that is used internally by other Boost libraries for defining Windows SDK components, has been updated to target Windows 10 API by default, where possible" so initially got lots of linker errors but was able to fix it pretty easily by changing #define BOOST_USE_WINAPI_VERSION BOOST_WINAPI_VERSION_WIN7 to BOOST_WINAPI_VERSION_WIN10 in my own header. but that didn't help with two remaining problems:
boost_log-vc140-mt-gd.lib(event.obj) : error LNK2019: unresolved external symbol WaitOnAddress referenced in function "public: static unsigned int __cdecl boost::atomics::detail::wait_operations_windows<struct boost::atomics::detail::core_operations<4,0,0>,4>::wait(unsigned int const volatile &,unsigned int,enum boost::memory_order)" (?wait@?$wait_operations_windows@U?$core_operations@$03$0A@$0A@@detail@atomics@boost@@$03@detail@atomics@boost@@SAIAEDIIW4memory_order@4@@z)
boost_log-vc140-mt-gd.lib(event.obj) : error LNK2019: unresolved external symbol WakeByAddressSingle referenced in function "public: static void __cdecl boost::atomics::detail::wait_operations_windows<struct boost::atomics::detail::core_operations<4,0,0>,4>::notify_one(unsigned int volatile &)" (?notify_one@?$wait_operations_windows@U?$core_operations@$03$0A@$0A@@detail@atomics@boost@@$03@detail@atomics@boost@@SAXAECI@Z)
fatal error LNK1120: 2 unresolved externals
after some digging in boost headers found that despite
https://www.boost.org/doc/libs/1_84_0/libs/atomic/doc/html/atomic/changelog.html#:~:text=The%20library%20is%20linked%20automatically%20on%20compilers%20that%20support%20auto%2Dlinking%20(e.g.%20MSVC)
it doesn't automatically links to synchronization.lib apparently because there is BOOST_ALL_NO_LIB defined in C:\Project\Libs\vcpkg\installed\x64-windows-static\include\boost\config\user.hpp
after that I was able to fix it by defining #define BOOST_ATOMIC_FORCE_AUTO_LINK 1 in aforementioned header file but wonder whether it's the most appropriate solution and what was the reason to define BOOST_ALL_NO_LIB in the first place. my app is VS based, no cmake there
Beta Was this translation helpful? Give feedback.
All reactions