Another thought, though I don't have gcc4.5 handy just now to verify: The errors in message.hxx may have come from a rearrangement of headers in the gcc4.5 C++0x implementation. Try adding #include <error_code> to the top of message.hxx. That ought to get rid of a few of these.
Again, I'll try to give it a shot tomorrow (I'm in Europe); if you're able to massage it in line before me, definitely send me a pull request. :) -- Andres 2012/1/27 Andres Jaan Tack <[email protected]> > (from the correct e-mail address…) > > Hi there. > > > Just as a starting note, Riak-Cpp is still a work in progress, with no > versioned release to date. Thus, I haven't gotten to the point of testing > many generations of compilers, yet. In the next month or so, I should get > sibling resolution finished, and then this will make it on my radar. > > That said, I've been using MSVC v10 and GCC 4.4 for development, so I'm a > bit surprised that GCC 4.5 isn't able to handle it. The first error (about > std::error_code) suggests that you're not getting C++11/C++0x support when > you compile. > > Can you verify your GCC version when compiling? SCons has a nasty habit of > resetting environment variables where it shouldn't, so if gcc4.3 is > installed in /usr/local/bin, it may be defaulting to that. > > If that reveals nothing, I'll try o reproduce and fix on my system > tomorrow. > > Lähetetty iPhonesta > > 2012/1/26 David Montgomery <[email protected]> > >> I tried to compile the cpp driver code on gitbub and the below are the >> erros. >> >> I am on Ubuntu 64 using gcc 4.5. At the prompt I typed >scons >> >> So...what do I do? >> >> Thanks >> >> >> test@test:~/Downloads/riak-cpp$ scons >> scons: Reading SConscript files ... >> scons: done reading SConscript files. >> scons: Building targets ... >> protoc build/riak/riakclient.proto --cpp_out=. >> (compile) build/riak/client.cxx >> In file included from ./riak/client.hxx:2:0, >> from build/riak/client.cxx:1: >> ./riak/message.hxx:29:28: error: ‘error_code’ is not a member of ‘std’ >> ./riak/message.hxx:29:76: error: functional cast expression list >> treated as compound expression >> ./riak/message.hxx:29:77: error: template argument 1 is invalid >> ./riak/message.hxx:29:86: error: invalid type in declaration before ‘;’ >> token >> build/riak/client.cxx: In member function ‘void >> riak::client::delete_object(const riak::key&, const riak::key&, >> riak::delete_response_handler)’: >> build/riak/client.cxx:95:105: error: cannot convert ‘std::_Bind<bool >> (*(std::function<void(const std::error_code&, const >> std::basic_string<char>&, const std::basic_string<char>&)>, >> std::basic_string<char>, std::basic_string<char>, >> std::_Placeholder<1>, std::_Placeholder<2>, >> std::_Placeholder<3>))(std::function<void(const std::error_code&, >> const std::basic_string<char>&, const std::basic_string<char>&)>, >> const std::basic_string<char>&, const std::basic_string<char>&, const >> std::error_code&, long unsigned int, const std::basic_string<char>&)>’ >> to ‘riak::message::handler’ in initialization >> build/riak/client.cxx: In member function ‘void >> riak::client::get_object(const riak::key&, const riak::key&, >> riak::get_response_handler)’: >> build/riak/client.cxx:171:70: error: cannot convert ‘std::_Bind<bool >> (*(std::basic_string<char>, std::basic_string<char>, >> std::function<std::shared_ptr<RpbContent>(const >> google::protobuf::RepeatedPtrField<RpbContent>&)>, >> riak::<unnamed>::delivery_arguments, std::function<void(const >> std::error_code&, std::shared_ptr<RpbContent>&, >> std::function<void(const std::shared_ptr<RpbContent>&, >> std::function<void(const std::error_code&)>&)>&)>, >> std::_Placeholder<1>, std::_Placeholder<2>, >> std::_Placeholder<3>))(const std::basic_string<char>&, const >> std::basic_string<char>&, >> std::function<std::shared_ptr<RpbContent>(const >> google::protobuf::RepeatedPtrField<RpbContent>&)>&, >> riak::<unnamed>::delivery_arguments&, std::function<void(const >> std::error_code&, std::shared_ptr<RpbContent>&, >> std::function<void(const std::shared_ptr<RpbContent>&, >> std::function<void(const std::error_code&)>&)>&)>, const >> std::error_code&, long unsigned int, const std::basic_string<char>&)>’ >> to ‘riak::message::handler’ in initialization >> build/riak/client.cxx: In function ‘riak::message::handler >> >> riak::<unnamed>::make_resolution_response_handler(std::shared_ptr<RpbContent>&, >> riak::<unnamed>::resolution_response_handler_for_object)’: >> build/riak/client.cxx:246:63: error: cannot convert >> ‘std::_Bind<std::function<bool(std::shared_ptr<RpbContent>&, const >> std::error_code&, long unsigned int, const >> std::basic_string<char>&)>(std::shared_ptr<RpbContent>, >> std::_Placeholder<1>, std::_Placeholder<2>, std::_Placeholder<3>)>’ to >> ‘riak::message::handler’ in return >> build/riak/client.cxx: In function ‘void >> riak::<unnamed>::put_cold(const riak::key&, const riak::key&, const >> std::shared_ptr<RpbContent>&, riak::<unnamed>::delivery_arguments&, >> riak::put_response_handler&)’: >> build/riak/client.cxx:350:107: error: cannot convert ‘std::_Bind<bool >> (*(std::function<void(const std::error_code&)>, std::_Placeholder<1>, >> std::_Placeholder<2>, std::_Placeholder<3>))(std::function<void(const >> std::error_code&)>, const std::error_code&, long unsigned int, const >> std::basic_string<char>&)>’ to ‘riak::message::handler’ for argument >> ‘3’ to ‘void riak::<unnamed>::send_put_request(RpbPutReq&, >> riak::<unnamed>::delivery_arguments&, riak::message::handler)’ >> scons: *** [build/riak/client.o] Error 1 >> scons: building terminated because of errors. >> >> _______________________________________________ >> riak-users mailing list >> [email protected] >> http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com >> > >
_______________________________________________ riak-users mailing list [email protected] http://lists.basho.com/mailman/listinfo/riak-users_lists.basho.com
