Boost C++ Libraries: Ticket #803: serialization and namespaces incompatability https://svn.boost.org/trac10/ticket/803 <pre class="wiki">Hi! I'm trying to use boost serialization library in my project. I've lanched jambuild with no problems and I have the library working. But there is a stress using namespace. My classes are all inside a namespace and when I try to use: BOOST_CLASS_TRACKING(A, boost::serialization::track_never) where A is: namespace FlowEngine { class A { public: template&lt;class Archive&gt; void serialize(Archive &amp; ar, const unsigned int version) { ar &amp; dumbf; ar &amp; dumbi; } int dumbi; float dumbf; A():dumbi(12), dumbf(69.69f){ } A(int dumb1, float dumb2) : dumbi(dumb1), dumbf(dumb2){ } }; BOOST_CLASS_TRACKING(A, boost::serialization::track_never) main.... } ////////////////////////////// I get this compile errors: error C2888: 'boost::serialization::tracking_level&lt;FlowEngine::A&gt;' : symbol cannot be defined within namespace 'FlowEngine' I'm using VC-80 setup. Is there a way to turn around the problem?? </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/803 Trac 1.4.3 gorogoro Fri, 05 Jan 2007 16:28:49 GMT <link>https://svn.boost.org/trac10/ticket/803#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/803#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=1684407 Originator: YES Another thing I've notest is that if I use the &amp; operator instead of the &lt;&lt; and &gt;&gt; on the function to wrote and read the object there aren't any problem. But if i use the &lt;&lt; or &gt;&gt; like here: int SilvTask::WriteObject() { A aux(12356, 8956.69f); //testAPointer = FE_NEW A(987, 123.56987f); // create and open a character archive for output std::ofstream ofs(m_filename.c_str()); boost::archive::text_oarchive oa(ofs); //write class instance to archive oa &lt;&lt; testAPointer; return FE_OK; } it gives me this error on compilation: error C2027: use of undefined type 'boost::STATIC_ASSERTION_FAILURE&lt;x&gt;' with [ x=false ] d:\flow project\flowengine\3rdparty\include\boost\archive\basic_text_oarchive.hpp(78) : see reference to function template instantiation 'void boost::archive::save&lt;Archive,T&gt;(Archive &amp;,T &amp;)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] d:\flow project\flowengine\3rdparty\include\boost\archive\detail\interface_oarchive.hpp(78) : see reference to function template instantiation 'void boost::archive::basic_text_oarchive&lt;Archive&gt;::save_override&lt;T&gt;(T &amp;,int)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] d:\flow project\flowengine\samples\silvestre\main2.cpp(141) : see reference to function template instantiation 'Archive &amp;boost::archive::detail::interface_oarchive&lt;Archive&gt;::operator &lt;&lt;&lt;FlowEngine::A*&gt;(T &amp;)' being compiled with [ Archive=boost::archive::text_oarchive, T=FlowEngine::A * ] That's why I'm trying to use the BOOST_CLASS_TRACKING(FlowEngine::A, boost::serialization::track_always); </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Mon, 08 Jan 2007 16:44:25 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/803#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/803#comment:2</guid> <description> <pre class="wiki">Logged In: YES user_id=396141 Originator: NO Try using BOOST_CLASS_TRACKING(FlowEngine::A, boost::serialization::track_never) outside of the namespace Check the "rationale" section of the documentation for issues related to interaction of "const" and "tracking. Robert Ramey </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 17 Jan 2007 19:12:21 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/803#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/803#comment:3</guid> <description> <pre class="wiki">Logged In: YES user_id=396141 Originator: NO BOOST_CLASS_TRACKING should be specified out side any namespace </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 17 Jan 2007 19:12:22 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/803#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/803#comment:4</guid> <description> <pre class="wiki">Logged In: YES user_id=396141 Originator: NO Thank you for submitting a Boost tech support request. &lt;BR&gt;*** At this time, tech support requests to this SourceForge tracker are monitored at best sporadically. A more reliable way to get answers is to post to the boost mailing list at &lt;a href="http://groups.yahoo.com/group/boost"&gt;http://groups.yahoo.co m/group/boost&lt;/a&gt;. Although the maintainers of Boost libraries try to respond to questions in a timely fashion, we offer no guarantee of service, express or implied. *** </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Robert Ramey</dc:creator> <pubDate>Wed, 17 Jan 2007 19:12:23 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/803#comment:5 https://svn.boost.org/trac10/ticket/803#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> Ticket