Boost logo

Boost Users :

Subject: Re: [Boost-users] Boost 1.56.0 has been released
From: Lars Viklund (zao_at_[hidden])
Date: 2014-08-11 09:35:13


On Mon, Aug 11, 2014 at 10:47:10AM +1200, Gavin Lambert wrote:
> On 9/08/2014 02:04, Lars Viklund wrote:
> >On Fri, Aug 08, 2014 at 12:39:18PM +0200, Christoffer Green wrote:
> >>..\..\..\lib/libPrimeGameEngineRelease.a(GameEngine.o):GameEngine.cpp:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0x27):
> >>undefined reference to `_InterlockedCompareExchange'
> >>..\..\..\lib/libPrimeGameEngineRelease.a(GameEngine.o):GameEngine.cpp:(.text$_ZN5boost6detail5win3223GetTickCount64emulationEv+0x87):
> >>undefined reference to `_InterlockedCompareExchange'
> [...]
> >In this case, you in your project appear to not be linking in the
> >library defining InterlockedCompareExchange, which IIRC is located in
> >Kernel32.lib.
>
> That should be a compiler intrinsic, though, not a library call. You may
> need the /Oi compiler flag and/or some #defines to accomplish this.

This isn't VC++, this is some form of mingw-like as gcc or clang.
Even on VC++, it's either an intrinsic or a library function in
Kernel32.lib, depending on the flag you mention. It's perfectly sane to
use the library call form if you or your implementation feel like it,
but you may have to link the library it exists in.

The leading underscore is either mangling for the C calling convention
on the platform or the actual spelling of the symbol given that it's a
name reserved for the vendor, I don't have my MS headers around.

-- 
Lars Viklund | zao_at_[hidden]

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