Boost logo

Boost Users :

Subject: [Boost-users] [Boost-Serialization] Problem with BOOST_CLASS_EXPORT
From: Soumen (soumen78_at_[hidden])
Date: 2009-09-03 05:52:32


Hi,

I'm getting conflicting declaration with BOOST_CLASS_EXPORT and I think I've
got the reason. But I'm not aware of clean solution to overcome this. Let me
explain the problem here.

Say in FileAB.h, I've class A, class B defined. I've a FileSExportAB.h where
I've BOOST_CLASS_EXPORT(A) at line say 10 and BOOST_CLASS_EXPORT(B) at line
11.

Similarly I've class C and class D defined FileCD.h. And FileSExportCD.h has
BOOST_CLASS_EXPORT(C) @ line 10 and BOOST_CLASS_EXPORT(D) @ line 11.

And while building, I get error like following:

------------------------------------------------------------------------------------------------
FileSExportCD.h:10: error: conflicting declaration ‘const
boost::archive::detail::guid_initializer<C>&
<unnamed>::boost_serialization_guid_initializer_10’
FileSExportAB.h:10: error:
‘<unnamed>::boost_serialization_guid_initializer_10’ has a previous
declaration as ‘const boost::archive::detail::guid_initializer &
<unnamed>::boost_serialization_guid_initializer_10’
------------------------------------------------------------------------------------------------

All A, B, C and D are in same namespace. Putting things at different
namespace is overkill on legacy code.

Is using BOOST_CLASS_EXPORT_GUID only better solution? Is it not pssible for
boost to resolve it automatically with BOOST_CLASS_EXPORT macro?

Regards,
~ Soumen

-- 
View this message in context: http://www.nabble.com/-Boost-Serialization--Problem-with-BOOST_CLASS_EXPORT-tp25272846p25272846.html
Sent from the Boost - Users mailing list archive at Nabble.com.

Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net