Boost logo

Boost Users :

Subject: Re: [Boost-users] 1.49 header order conflicts on Windows
From: Vicente J. Botet Escriba (vicente.botet_at_[hidden])
Date: 2012-06-13 17:34:45


Le 13/06/12 21:03, Davidson, Josh a écrit :
>
> Consider this following simple app:
>
> #include <boost/thread/thread.hpp>
>
> #include <boost/asio.hpp>
>
> #include <boost/thread/recursive_mutex.hpp>
>
> int main() {
>
> return 0;
>
> }
>
> If you try to build that on Windows, you receive the following error:
>
> In file included from
> c:/mingw/lib/gcc/../../x86_64-w64-mingw32/include/boost/thread/win32/recursive_mutex.hpp:14:0,
>
> from
> c:/mingw/lib/gcc/../../x86_64-w64-mingw32/include/boost/thread/recursive_mutex.hpp:14,
>
> from build.cpp:3:
>
> c:/mingw/lib/gcc/../../x86_64-w64-mingw32/include/boost/thread/win32/basic_recursive_mutex.hpp:
> In member function 'void
> boost::detail::basic_recursive_mutex_impl<underlying_mutex_type>::lock()':
>
> c:/mingw/lib/gcc/../../x86_64-w64-mingw32/include/boost/thread/win32/basic_recursive_mutex.hpp:52:21:
> error: '_InterlockedExchange' is not a member of 'boost::detail'
>
> c:/mingw/lib/gcc/../../x86_64-w64-mingw32/include/boost/thread/win32/basic_recursive_mutex.hpp:
> In member function 'void
> boost::detail::basic_recursive_mutex_impl<underlying_mutex_type>::unlock()':
>
>
> If asio.hpp is moved ahead of the thread headers, the error goes
> away. We've been trying to dictate #include order to work around this
> problem, but it keeps cropping up.
>
>
Hi,

I haven't a windows machine at hand. Please could you get the result of
the preprocessor and see what is happening with the
detail/interlocked.hpp file where boost::detail::InterlockedExchange
should be defined?

Could you also send the command line you use to get this error?

Thanks,
Vicente



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net