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).aspx).

#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