[Thread] Version 1.66.0 incompatible with ISOLATION_AWARE_ENABLED
I work on a Windows code base that I have been updating from Boost 1.64.0 to Boost 1.66.0. One of the projects sets ISOLATION_AWARE_ENABLED to 1 (refer to https://msdn.microsoft.com/en-us/library/windows/desktop/bb773175(v=vs.85).a...). #define ISOLATION_AWARE_ENABLED 1 The project also includes <boost/thread.hpp>. The Windows SDK version is 10.0.16299.0. The include chain is: <boost/thread.hpp> <boost/thread/thread.hpp> <boost/thread/thread_only.hpp> <boost/thread/win32/thread_data.hpp> <boost/thread/win32/thread_primitives.hpp> <boost/detail/winapi/dll.hpp> <boost/winapi/dll.hpp> The last include contains constructions such as: BOOST_SYMBOL_IMPORT boost::winapi::HMODULE_ WINAPI LoadLibraryA(boost::winapi::LPCSTR_ lpFileName); With a nonzero ISOLATION_AWARE_ENABLED, this results in redefinition errors, e.g.: .../boost/winapi/dll.hpp(38): error C2375: 'IsolationAwareLoadLibraryA': redefinition; different linkage ...\include\10.0.16299.0\um\winbase.inl(287): note: see declaration of 'IsolationAwareLoadLibraryA' Jim Wilburn
Boost 1.66 added it's own Windows API definitions to allow compilation without the Windows SDK. You can override this by defining BOOST_USE_WINDOWS_H. We fixed the same error by using this in out precompiled header: #define ISOLATION_AWARE_ENABLED 1 #define BOOST_USE_WINDOWS_H 1 <Windows include files> <Boost include files -- Sent from: http://boost.2283326.n4.nabble.com/Boost-Users-f2553780.html
participants (2)
-
Jim Wilburn
-
Simonp