Boost logo

Boost Users :

Subject: Re: [Boost-users] undefined references '__sync_fetch_and_add_4 'for Boost_1_39_0 on Alpha platform
From: Yan Wu (wuyan.ooorg_at_[hidden])
Date: 2010-11-24 07:36:16


On 11/24/10, Peter Dimov <pdimov_at_[hidden]> wrote:
> Yan Wu wrote:
>> > Yes. To disable shared_ptr's use of these intrinsics, #define
>> > BOOST_SP_USE_PTHREADS.
>> >
>> Thanks for your kindly replies. It's a little difficult to implement
>> the atomic operations by myself;-)
>> Where should the macro BOOST_SP_USE_PTHREADS be defined ? Which file
>> in boost or the file in my comphelper.cxx?
>
> You need to define it in each cpp/cxx file that uses shared_ptr. The safest
> way to do that is to define it globally for the project by, for example,
> adding -DBOOST_SP_USE_PTHREADS to the build flags.
>
I added -DBOOST_SP_USE_PTHREADS globally and the compiling passed
successfully. Thanks very much for your help.

Regards,
Yan


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