Boost logo

Boost Users :

Subject: Re: [Boost-users] undefined references '__sync_fetch_and_add_4 'for Boost_1_39_0 on Alpha platform
From: Peter Dimov (pdimov_at_[hidden])
Date: 2010-11-23 11:21:06


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.


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