Boost C++ Libraries: Ticket #1290: Serialization export.hpp (or type_info_implementation.hpp) is NOT self-contained and causes compile error https://svn.boost.org/trac10/ticket/1290 <p> The following code should compile: </p> <p> #include &lt;boost/serialization/export.hpp&gt; </p> <p> class A { }; </p> <p> BOOST_CLASS_EXPORT( A ); </p> <p> instead I got: </p> <p> error C2027: use of undefined type 'boost::serialization::extended_type_info_impl&lt;T&gt;' 1&gt; with 1&gt; [ 1&gt; T=A 1&gt; ] </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/1290 Trac 1.4.3 Marshall Clow Tue, 02 Oct 2007 15:58:03 GMT component changed; owner set https://svn.boost.org/trac10/ticket/1290#comment:1 https://svn.boost.org/trac10/ticket/1290#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Robert Ramey</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">serialization</span> </li> </ul> Ticket Julian <julian.magnone+boost@…> Mon, 12 Nov 2007 15:58:59 GMT <link>https://svn.boost.org/trac10/ticket/1290#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/1290#comment:2</guid> <description> <p> We are having the same problem. </p> <p> We used the following macro instead and it worked fine but hasn't sense for us, because we are using gcc for compile the source code, and this Macro is for <a class="missing wiki">CodeWarrior</a>. </p> <p> export.hpp<br /> 166 <em> <a class="missing wiki">CodeWarrior</a> fails to construct static members of class templates<br /> 167 </em> when they are instantiated from within templates, so on that<br /> 168 <em> compiler we ask users to specifically register base/derived class<br /> 169 </em> relationships for exported classes. On all other compilers, use of<br /> 170 <em> this macro is entirely optional.<br /> <strong>171 # define BOOST_SERIALIZATION_MWERKS_BASE_AND_DERIVED(Base,Derived) \</strong><br /> 172 namespace \<br /> 173 { \<br /> 174 int BOOST_PP_CAT(boost_serialization_mwerks_init_, <span class="underline">LINE</span>) = \<br /> 175 (::boost::archive::detail::instantiate_ptr_serialization((Derived*)0,0), 3); \<br /> 176 int BOOST_PP_CAT(boost_serialization_mwerks_init2_, <span class="underline">LINE</span>) = ( \<br /> 177 ::boost::serialization::void_cast_register((Derived*)0,(Base*)0) \<br /> 178 , 3); \<br /> 179 }<br /> 180 <br /> </em></p> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Fri, 30 Nov 2007 05:46:42 GMT</pubDate> <title>status changed; resolution set; milestone deleted https://svn.boost.org/trac10/ticket/1290#comment:3 https://svn.boost.org/trac10/ticket/1290#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> <li><strong>milestone</strong> <span class="trac-field-deleted">To Be Determined</span> </li> </ul> Ticket