
24 Nov
2010
24 Nov
'10
12:36 p.m.
On 11/24/10, Peter Dimov
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