AMDG professor rumsdiegeige wrote:
I've got a problem using BOOST_CLASS_VERSION on gcc.
<snip>
then the code only compiles on MSVC2005, but not on gcc. GCC complains about an incorrect syntax here, without being more specific.
What am I doing wrong?
What version of Boost are you using? What version of gcc? Can you provide a complete example of what you are trying to compile? The following compiles for me with gcc-3.4.4 and gcc-4.3.0 against all versions of boost from 1.33.1 to the trunk #include <boost/noncopyable.hpp> #include <boost/serialization/access.hpp> #include <boost/serialization/version.hpp> class CHeader : boost::noncopyable { public: CHeader() {PosX_ = 1.0;}; friend class boost::serialization::access; template<class Archive> void serialize(Archive & ar, const unsigned int version) { ar & PosX_; } double PosX_; }; BOOST_CLASS_VERSION(CHeader, 1) In Christ, Steven Watanabe