Visual Studio 2015

RCF support and general discussion.
Post Reply
CalvinRi
Posts: 3
Joined: Tue Apr 12, 2016 12:33 pm

Visual Studio 2015

Post by CalvinRi »

Hi

I'm using RCF 1.3.1 for a while now in my app.

I'm having compiler problems while building in VS2015. I was building my app with all older Visual Studio versions (2008, 2010, 2012, 2013) without any problems, and now I cannot build it anymore, because of numerous compiler errors, without some clear point what is wrong.

Then I downloaded version RCF 2.1.0.0, combined with boost 1.55 or 1.59, I have only one error: Error C2039 'serialize': is not a member of boost::shared_ptr<Repository::CMyClass>'

Note that this error was never here in onlder VS versions, and everything was working well.

But, if I use latest boost (1.6), then I get this error: Error C2665 'SF::sfNewImpl': none of the 2 overloads could convert all the argument types RepositoryClientPlugin_RSNetwork xxxx\RCF-2\include\SF\SfNew.hpp

First error suggests that I do not have serialize implemented in my class, but I do not know what second error actually means.

Any hints?

Thank you

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Visual Studio 2015

Post by jarl »

Hi,

We have a new RCF release which is just about ready to go out the door. It has been tested against both VS 2015 and Boost 1.60.0 , so most likely that will resolve your issues. It should be on the website within the next few days.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

CalvinRi
Posts: 3
Joined: Tue Apr 12, 2016 12:33 pm

Re: Visual Studio 2015

Post by CalvinRi »

Thank you for your answer!

CalvinRi
Posts: 3
Joined: Tue Apr 12, 2016 12:33 pm

Re: Visual Studio 2015

Post by CalvinRi »

I tried to build with latest version, ending with the same result. RCF complained that there is no serialize function defined for my objects, but that was not true, at least for older compilers.

Code: Select all

void serialize(SF::Archive &ar, CRepositoryFile &file);
void serialize(SF::Archive &ar, CNetRepositoryItem &item);
void serialize(SF::Archive &ar, CNetCatalogueItem &item);
Then I went into the code, and realized that he is complaining because I actually use shared pointers from boost, so I wrote another 3 functions,just as wrappers for first 3:

Code: Select all

void serialize(SF::Archive &ar, boost::shared_ptr<CRepositoryFile> &file);
void serialize(SF::Archive &ar, boost::shared_ptr<CNetRepositoryItem> &item);
void serialize(SF::Archive &ar, boost::shared_ptr<CNetCatalogueItem> &item);
And it built without errors.

I understand the problem, but I do not know why it worked before.

jarl
Posts: 238
Joined: Mon Oct 03, 2011 4:53 am
Contact:

Re: Visual Studio 2015

Post by jarl »

OK, I see. If you are serializing shared_ptr<> objects, all you need to do is put this:

Code: Select all

#include <SF/shared_ptr.hpp>
, at the top of your source code.
Kind Regards

Jarl Lindrud
Delta V Software
http://www.deltavsoft.com

Post Reply