Boost logo

Boost :

Subject: Re: [boost] [Boost-users] cross-compilation x86_64-w64-ming32: undefined reference to `InterlockedIncrement'
From: Peter Dimov (lists_at_[hidden])
Date: 2013-09-23 09:48:59


Andrey Semashev wrote:
> The macros are supposed to provide low level atomic ops on Windows, aren't
> they? Wouldn't it be better to use gcc atomic intrinsics instead of WinAPI
> calls in case of MinGW?

No, the macros were supposed to be a portable way of accessing the
Interlocked* family of WinAPI calls without having to #include <windows.h>.
That's probably why shared_ptr doesn't have a problem on MingW64 - it uses a
g++ specific implementation there. (Interlocked* later mutated into compiler
intrinsics.)


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk