Boost C++ Libraries: Ticket #7074: [thread] Multiply defined symbol boost::allocator_arg https://svn.boost.org/trac10/ticket/7074 <p> 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: </p> <pre class="wiki">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}}} </pre><p> and consequently: </p> <pre class="wiki">fatal error LNK1169: one or more multiply defined symbols found </pre><p> I'm wondering if perhaps the declaration of allocator_arg in thread/detail/memory.hpp should be: </p> <pre class="wiki">BOOST_STATIC_CONSTEXPR allocator_arg_t allocator_arg = {}; </pre><p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/7074 Trac 1.4.3 viboes Thu, 05 Jul 2012 05:48:37 GMT <link>https://svn.boost.org/trac10/ticket/7074#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7074#comment:1</guid> <description> <p> Hi, sorry it should be BOOST_CONSTEXPR_OR_CONST. </p> <p> Please could you try with </p> <pre class="wiki">BOOST_CONSTEXPR_OR_CONST allocator_arg_t allocator_arg = {}; </pre><p> I will commit it if it solves the issue. </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 05 Jul 2012 05:56:15 GMT</pubDate> <title>owner, status changed https://svn.boost.org/trac10/ticket/7074#comment:2 https://svn.boost.org/trac10/ticket/7074#comment:2 <ul> <li><strong>owner</strong> changed from <span class="trac-author">Anthony Williams</span> to <span class="trac-author">viboes</span> </li> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">assigned</span> </li> </ul> Ticket anonymous Thu, 05 Jul 2012 12:35:45 GMT <link>https://svn.boost.org/trac10/ticket/7074#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/7074#comment:3</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/7074#comment:1" title="Comment 1">viboes</a>: </p> <blockquote class="citation"> <p> Hi, sorry it should be BOOST_CONSTEXPR_OR_CONST. </p> </blockquote> <p> That fixes it. </p> <p> Many thanks for all your work! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>viboes</dc:creator> <pubDate>Thu, 05 Jul 2012 16:42:49 GMT</pubDate> <title>milestone changed https://svn.boost.org/trac10/ticket/7074#comment:4 https://svn.boost.org/trac10/ticket/7074#comment:4 <ul> <li><strong>milestone</strong> <span class="trac-field-old">To Be Determined</span> → <span class="trac-field-new">Boost 1.51.0</span> </li> </ul> <p> Committed in trunk revision 79288. </p> Ticket viboes Mon, 09 Jul 2012 21:15:48 GMT status changed; resolution set https://svn.boost.org/trac10/ticket/7074#comment:5 https://svn.boost.org/trac10/ticket/7074#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Committed revision <a class="changeset" href="https://svn.boost.org/trac10/changeset/79373" title="Thread: merge from trunk">[79373]</a>. </p> Ticket