Build error: Callback connection example.

RCF support and general discussion.
Post Reply
andy
Posts: 2
Joined: Fri Nov 11, 2016 9:12 am

Build error: Callback connection example.

Post by andy »

Hello,
I am working currently with version RCF 2.2.0.0. An Error occured When building the Callback connection example with VS2015.

Callback connection Example:
http://www.deltavsoft.com/doc/rcf_user_ ... onnections

Error message:
boost\boost\bind\bind.hpp(315): error C2664: 'void (RCF::RcfSessionPtr,RCF::ClientTransportAutoPtr)': cannot convert argument 2 from 'const RCF::ClientTransportAutoPtr' to 'RCF::ClientTransportAutoPtr'

Boost Version:1.59.0

Can you help me? Thank you!

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

Re: Build error: Callback connection example.

Post by jarl »

Hi there,

I was able to reproduce this compiler error with boost 1.59, but not with boost 1.60... So one option is to upgrade to a newer Boost version.

Alternatively you can use standard C++ binding instead of Boost Bind, by changing this code:

Code: Select all

	setOnCallbackConnectionCreated(
		boost::bind(&onCallbackConnectionCreated, _1, _2));

, to this:

Code: Select all


#include <functional>
// ...

	using std::placeholders::_1;
	using std::placeholders::_2;
	server.setOnCallbackConnectionCreated(
		std::bind(&onCallbackConnectionCreated, _1, _2));


Kind Regards

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

andy
Posts: 2
Joined: Fri Nov 11, 2016 9:12 am

Re: Build error: Callback connection example.

Post by andy »

Problem solved! Thank you very much!

Post Reply