Dear Steve,
It looks like mingw defines its own versions of windows.h and wincrypt.h that are missing a few declarations. Try the attached patch against 1.42.
Thank you for the patch. It unfortunately doesn't still completely work. The compile-log can again be found in the P.S. Any other suggestions? TIA, --Hossein P.S. D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:34: warning: ignoring #pragma comment D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp: In constructor `boost::random_device::impl::impl(const std::string&)': D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:49: error: `CryptEnumProvidersA' was not declared in this scope D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:49: warning: unused variable 'CryptEnumProvidersA' D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp: In member function `void boost::random_device::impl::error(const std::string&)': D:/Sources/Boost/boost_1_42_0/libs/random/random_device.cpp:80: warning: unused variable 'error_code'