Boost logo

Boost Users :

From: Cory Nelson (phrosty_at_[hidden])
Date: 2007-01-18 01:27:22


On 1/17/07, Leslie Brody (TT) <leslie.brody_at_[hidden]> wrote:
>
>
> When compiling boost 1.33.1 with Visual Studio 2005 SP1 for 64 bit AMD on
> windows I get the following error.
>
> once.obj : error LNK2019: unresolved external symbol
> _InterlockedCompareExchange referenced in function "long __cdecl `anonymous
> namespace'::compare_exchange(long * volatile,long,long)"
> (?compare_exchange@?A0x74ecc88f@@YAJREAJJJ_at_Z)
>
> From what I have seen this works in multiple other projects. This also works
> if I use that header in a new isolated project. I am assuming it is some
> compiler setting. But I am not sure which.

Nope - it's some weird code in boost threads bugging out.

Open up libs\thread\src\once.cpp and delete all the ice_wrapper
functions. replace compare_exchange's body with "return
InterlockedCompareExchange(dest, exch, cmp);"

> Any thoughts are greatly appreciated
>
> Thank You
>
> -Leslie
> _______________________________________________
> Boost-users mailing list
> Boost-users_at_[hidden]
> http://lists.boost.org/mailman/listinfo.cgi/boost-users
>
>

-- 
Cory Nelson
http://www.int64.org

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