Using Boost Serialization
Posted: Mon Jun 23, 2014 2:14 pm
Hello!
I'm trying to build a RCF-2.0.1.100 with using Boost.Serialization.
I've defined RCF_USE_BOOST_SERIALIZATION for all RCFDemo projects and I modified MyService.hpp like this:
But I'm getting error messages in both Client and Server projects.
I also get an error in case I try to use my class as a parameter:
Error log:
How can I disable SF usage?
PS. Compiler is Visual C++ 2010, Boost 1.55
I'm trying to build a RCF-2.0.1.100 with using Boost.Serialization.
I've defined RCF_USE_BOOST_SERIALIZATION for all RCFDemo projects and I modified MyService.hpp like this:
Code: Select all
#ifndef INCLUDE_MYSERVICE_HPP
#define INCLUDE_MYSERVICE_HPP
#include <string>
#include <vector>
#include <boost/serialization/vector.hpp>
#include <RCF/Idl.hpp>
// ensure RCF_USE_BOOST_SERIALIZATION is used
#ifndef RCF_USE_BOOST_SERIALIZATION
#error This is a test for RCF_USE_BOOST_SERIALIZATION
#endif
RCF_BEGIN(MyService, "MyService")
RCF_METHOD_V1(void, reverse, std::vector<std::string> &);
RCF_END(MyService);
#endif // ! INCLUDE_MYSERVICE_HPP
Code: Select all
1>c:\users\raider\desktop\rcf-2.0.1.100\include\sf\serializer.hpp(283): error C2039: 'serialize' : is not a member of 'std::vector<_Ty>'
1> with
1> [
1> _Ty=std::string
1> ]
1> c:\users\raider\desktop\rcf-2.0.1.100\include\sf\serializer.hpp(301) : see reference to function template instantiation 'void SF::serializeInternal<T>(SF::Archive &,T &)' being compiled
1> with
1> [
1> T=U
1> ]
...
Code: Select all
struct myvector
{
void reverse()
{
// todo
}
template <class TArchive>
void serialize(TArchive &Archive, const unsigned int Version)
{
// todo
}
};
RCF_BEGIN(MyService, "MyService")
RCF_METHOD_V1(void, reverse, myvector &);
RCF_END(MyService);
Code: Select all
1>c:\users\raider\desktop\rcf-2.0.1.100\include\sf\serializer.hpp(283): error C2780: 'void myvector::serialize(TArchive &,const unsigned int)' : expects 2 arguments - 1 provided
1> c:\users\raider\desktop\rcf-2.0.1.100\demo\myservice.hpp(23) : see declaration of 'myvector::serialize'
1> c:\users\raider\desktop\rcf-2.0.1.100\include\sf\serializer.hpp(301) : see reference to function template instantiation 'void SF::serializeInternal<T>(SF::Archive &,T &)' being compiled
1> with
1> [
1> T=U
1> ]
...
PS. Compiler is Visual C++ 2010, Boost 1.55