Thank you for reply Robert,<div><br></div><div>Yes, i&#39;ve compiled the code using GCC 4.5. Now i see the warning you mentioned:</div><div><br></div><div>warning:40: type qualifiers ignored on function return type</div><div>
<div><br></div><div>I&#39;ve used BOOST_SERIALIZATION_ASSUME_ABSTRACT because the library documentation is a little confusing with the &quot;abstract class&quot; term. But note that even commenting out the macro, the problem remains. What is the warning about on line 40? I&#39;m missing something trivial? :-)</div>
<div><br></div><div>I&#39;ve also tried to misplace the BOOST_EXPORT_CLASS macro among the source lines, but without success. Do you have any hint in what is happening?</div><div><br></div><div>Appreciate your help,</div>
<div>Júlio.</div><br><div class="gmail_quote">2011/8/5 Robert Ramey <span dir="ltr">&lt;<a href="mailto:ramey@rrsd.com">ramey@rrsd.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<u></u>





<div bgcolor="#ffffff"><div class="im">
<div>Júlio Hoffimann wrote:<br>&gt; Dear all,<br>&gt; <br>&gt; <br>&gt; I&#39;m 
using Boost 1.45...<br>&gt; <br>&gt; <br>&gt; I&#39;ve read Boost.Serialization docs 
so many times and can&#39;t understand<br>&gt; why my testcase is not working as 
expected. According to the<br>&gt; following three links, we need to address 
serialization of derived<br>&gt; classes with &quot;abstract&quot; base class by using 
boost macros:   <br>&gt; <br>&gt; <br>&gt; 
<a href="http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/traits.html#export" target="_blank">http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/traits.html#export</a><br>&gt; 
<br>&gt; <br>&gt; 
<a href="http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/special.html#export" target="_blank">http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/special.html#export</a><br>&gt; 
<br>&gt; <br>&gt; 
<a href="http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/traits.html#abstract" target="_blank">http://www.boost.org/doc/libs/1_47_0/libs/serialization/doc/traits.html#abstract</a><br>&gt; 
<br>&gt; <br>&gt; I did my testcase ( <a href="http://codepad.org/6ETp1Ac0" target="_blank">http://codepad.org/6ETp1Ac0</a> ) completely 
based on<br>&gt; the demo:<br>&gt; <a href="http://www.boost.org/doc/libs/1_47_0/libs/serialization/example/demo.cpp" target="_blank">http://www.boost.org/doc/libs/1_47_0/libs/serialization/example/demo.cpp</a></div>
<div> </div>
</div><div><font face="Arial" size="2">Have you tried to build adn run the demo as it 
is?  Does it work?</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">Robert Ramey</font></div><div class="im"><font face="Arial" size="2"></font>
<div><br>&gt; <br>&gt; <br>&gt; Compiling and running shows that the derived 
class archive contains<br>&gt; just the base class data members. What is 
happening? How can i solve<br>&gt; this problem?  </div>
<div> </div>
</div><div><font face="Arial" size="2">One obvious problem is that the base class is not 
abstract.  To be abstract,</font></div>
<div><font face="Arial" size="2">a base class must have atleast one virtual function 
in the form</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">virtual my_function() = 0;</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">The ASSUME_ABSTRACT macro doesn&#39;t mark it abstract 
to the</font></div>
<div><font face="Arial" size="2">compiler - it marks it abstract to the boost 
type-traites system.  </font></div>
<div><font face="Arial" size="2">I know it&#39;s quirky and unclear - but I see no way 
to make it bullet proof.</font></div>
<div><font face="Arial" size="2"></font> </div>
<div><font face="Arial" size="2">I&#39;m sort of surprised/disappointed that this 
doesn&#39;t give a compile time</font></div>
<div><font face="Arial" size="2">warning.  What compiler do you 
use?</font></div>
<div><font face="Arial" size="2"></font> </div><font color="#888888">
<div><font face="Arial" size="2">Robert Ramey</font></div></font><div class="im">
<div> </div>
<div><font face="Arial" size="2"></font><br>&gt; <br>&gt; <br>&gt; I really 
appreciate any help,<br>&gt; Júlio.<br>&gt; <br></div></div></div>
<br>_______________________________________________<br>
Boost-users mailing list<br>
<a href="mailto:Boost-users@lists.boost.org">Boost-users@lists.boost.org</a><br>
<a href="http://listarchives.boost.org/mailman/listinfo.cgi/boost-users" target="_blank">http://listarchives.boost.org/mailman/listinfo.cgi/boost-users</a><br></blockquote></div><br></div>

