Boost logo

Boost :

Subject: Re: [boost] [boost.atomic] linker error with gcc 4.1.2
From: Helge Bahmann (hcb_at_[hidden])
Date: 2010-03-04 03:47:37


Hi Jamie,

On Wed, 3 Mar 2010, Jamie Allsop wrote:

> With gcc 4.1.2 (gcc 4.3.x is fine) I am seeing this linker error:
>
> .build/debug/working/SourceOne.o:
> In function `void
> boost::detail::atomic::platform_atomic_thread_fence<boost::memory_order>(boost::memory_order)':
> /thirdparty/boost/boost_1_42/boost/smart_ptr/detail/shared_count.hpp:229:
> multiple definition of `void
> boost::detail::atomic::platform_atomic_thread_fence<boost::memory_order>(boost::memory_order)'
> .build/debug/working/SourceTwo.o:
> /thirdparty/boost/boost_1_42/boost/atomic/detail/gcc-x86.hpp:63: first
> defined here

[...]

> Is this a compiler error or should the specialisation be declared as:
>
> template<>
> inline void platform_atomic_thread_fence(memory_order order)

you are right, it should have been specialized this way. I have however
reorganized my development tree such that this is now handled differently
(macros instead of via template specialization), so if you are patient
until saturday, this will be resolved.

Best regards
Helge


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk