I probably missed the original problem, but the patch doesn't look correct to me. The section guarded with "defined( BOOST_MSVC ) || defined( BOOST_INTEL_WIN )" is obviously targeted for compilers supporting interlocked intrinsics, which gcc isn't. MinGW should probably be handled by the last section of the #if/elif/endif sequence. Anyway, what problem are you trying to fix?
Here is what I get when build an application with boost and mingw-w64 targeting x86_64: /usr/x86_64-w64-mingw32/sys- root/mingw/lib/../lib/libboost_thread-mt.a(thread.o):(.text+0x286): undefined reference to `InterlockedIncrement' /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libboost_thread-mt.a(thread.o):(.text+0x3e7): undefined reference to `InterlockedDecrement' /usr/lib64/gcc/x86_64-w64-mingw32/4.8.1/../../../../x86_64-w64-mingw32/bin/ld: /usr/x86_64-w64-mingw32/sys-root/mingw/lib/../lib/libboost_thread-mt.a(thread.o): bad reloc address 0x8 in section `.data' I have been able to solve this by defining BOOST_USE_WINDOWS_H but this creates issues with Unicode when I also use wxWidgets. The patch proposed solves the issue. I recognise that I say that gcc should be considered as MSVC with regards to these Interlocked things which I do not understand. It may seem strange but it works. What's wrong with it? Basically, I just #include <intrin.h>; what's wrong with that? Frédéric