RCF 1.3.1 compiled with gcc 4.7.0 and C++11

RCF support and general discussion.
Post Reply
Volker
Posts: 26
Joined: Wed May 23, 2012 3:27 pm

RCF 1.3.1 compiled with gcc 4.7.0 and C++11

Post by Volker »

Hi !

I tried to build the latest official version of RCF in combination with the newest version of gcc (4.7.0) :

Code: Select all

cd ./src/RCF
g++ -g -std=c++0x -m64 -Wno-deprecated -I ../../include/ -I/opt/boost_1_49_0 -DRCF_USE_BOOST_ASIO -DRCF_USE_BOOST_THREADS -pthread -fPIC -shared -o libRCF.so RCF.cpp -L/opt/boost_1_49_0/stage/lib -lboost_system
This fails with the following error :

Code: Select all

In file included from ../../include/SF/Archive.hpp:79:0,
                 from ../../include/SF/Stream.hpp:330,
                 from ../../include/SF/IBinaryStream.hpp:19,
                 from ../../include/RCF/Protocol/SF.hpp:21,
                 from ../../include/RCF/SerializationProtocol.hpp:40,
                 from ../../include/RCF/Endpoint.hpp:25,
                 from ../../include/RCF/ClientStub.hpp:30,
                 from BsdClientTransport.cpp:18,
                 from RCF.cpp:40:
../../include/SF/Serializer.hpp: In function 'void SF::serializeEnum(SF::Archive&, T&)':
../../include/SF/Serializer.hpp:253:18: error: no match for 'operator&' in 'ar & n'
../../include/SF/Serializer.hpp:253:18: note: candidate is:
In file included from ../../include/SF/Stream.hpp:330:0,
                 from ../../include/SF/IBinaryStream.hpp:19,
                 from ../../include/RCF/Protocol/SF.hpp:21,
                 from ../../include/RCF/SerializationProtocol.hpp:40,
                 from ../../include/RCF/Endpoint.hpp:25,
                 from ../../include/RCF/ClientStub.hpp:30,
                 from BsdClientTransport.cpp:18,
                 from RCF.cpp:40:
../../include/SF/Archive.hpp:53:21: note: SF::Archive& SF::Archive::operator&(SF::Archive::Flag) <near match>
../../include/SF/Archive.hpp:53:21: note:   no known conversion for argument 1 from 'int32_t {aka int}' to 'SF::Archive::Flag'
Unfortunately I have no clue how to fix this.

Regards

Volker

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

Re: RCF 1.3.1 compiled with gcc 4.7.0 and C++11

Post by jarl »

Hi Volker,

I don't have a dev environment with gcc 4.7.0 readily available to test on. However - do you get still get the error if you omit the "-stdc++0x" flag?
Kind Regards

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

Volker
Posts: 26
Joined: Wed May 23, 2012 3:27 pm

Re: RCF 1.3.1 compiled with gcc 4.7.0 and C++11

Post by Volker »

Hi Jarl,

when I omit the option "-std=c++0x" the error message still remains. But gcc 4.6.3 does the trick, possible that the gcc 4.7-series is a little bit too young. I am happy with 4.6.3, currently there is no real need for the gcc 4.7-series for me.

Regards

Volker

Volker
Posts: 26
Joined: Wed May 23, 2012 3:27 pm

Re: RCF 1.3.1 compiled with gcc 4.7.0 and C++11

Post by Volker »

Hi Jarl,

I can confirm that RCF-2.0.0.2670 indeed fixes this problem. Thanks a lot !

Regards

Volker

Post Reply