Boost logo

Boost-Build :

Subject: Re: [Boost-build] Problem with pragma intrinsic(_InterlockedCompareExchange)
From: Vladimir Prus (ghost_at_[hidden])
Date: 2014-08-19 01:28:21

On 08/19/2014 08:44 AM, Adam Beneschan wrote:
> I'm not an old hand at building Boost (I did install 1.55 on a different machine), so sorry if this is a trivial question.
> I'm trying to build 1.56 on a Windows 8 system, using mingw and gcc.
> bootstrap.bat mingw
> b2 toolset=gcc --build-type=complete stage
> This results in a number of occurrences of this message:
> ./boost/thread/win32/thread_primitives.hpp:180:0: warning: ignoring #pragma intrinsic [-Wunknown-pragmas]
> #pragma intrinsic(_InterlockedCompareExchange)
> I can't link any program that needs -lboost_thread; it complains about undefined references to _InterlockedCompareExchange.
> Is this just a matter of adding __stdcall to the declaration of _InterlockedCompareExchange in thread_primitives.hpp, or is a different fix
> needed?
> Assuming I either fix the source myself or get a patch, how would I rebuild without rebuilding all of Boost from scratch? Sorry if this
> seems like a dumb question, but so far I've just followed instructions without really knowing anything about b2, and I'm hoping not to have
> to do another four-and-a-half-hour build.


you would just run the same "b2" command you used, and it will rebuild the things that needs rebuilding.

I cannot comment on the best source-level fix though - Boost.Thread maintainers would have to answer that.

- Volodya

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at