Opened 10 years ago
Closed 10 years ago
#7074 closed Bugs (fixed)
[thread] Multiply defined symbol boost::allocator_arg
Reported by: | anonymous | Owned by: | viboes |
---|---|---|---|
Milestone: | Boost 1.51.0 | Component: | thread |
Version: | Boost 1.50.0 | Severity: | Problem |
Keywords: | Cc: |
Description
I'm updating from boost 1_49 to 1_50, a project that uses pre-compiled headers and MSVC 2010. I find I'm getting:
shared.lib(stdafx.obj) : error LNK2005: "struct boost::container::allocator_arg_t boost::allocator_arg" (?allocator_arg@boost@@3Uallocator_arg_t@container@1@A) already defined in stdafx.obj}}}
and consequently:
fatal error LNK1169: one or more multiply defined symbols found
I'm wondering if perhaps the declaration of allocator_arg in thread/detail/memory.hpp should be:
BOOST_STATIC_CONSTEXPR allocator_arg_t allocator_arg = {};
P.S. I feel I'm really sticking my neck out commenting on your code, but it's the only thing that makes sense to me.
Change History (5)
follow-up: 3 comment:1 by , 10 years ago
comment:2 by , 10 years ago
Owner: | changed from | to
---|---|
Status: | new → assigned |
comment:3 by , 10 years ago
Replying to viboes:
Hi, sorry it should be BOOST_CONSTEXPR_OR_CONST.
That fixes it.
Many thanks for all your work!
comment:4 by , 10 years ago
Milestone: | To Be Determined → Boost 1.51.0 |
---|
Committed in trunk revision 79288.
comment:5 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
Committed revision [79373].
Note:
See TracTickets
for help on using tickets.
Hi, sorry it should be BOOST_CONSTEXPR_OR_CONST.
Please could you try with
I will commit it if it solves the issue.