
Sean Rhea wrote:
Currently, however, I can't get it to compile. The error from gcc 4.0.1 on OS X Tiger is:
g++ -c -g -I/usr/local/include/boost-1_33_1 -I.. rpc_server.cpp rpc_server.cpp: In member function 'void rpc_server::set_handler(int, int, int, int (*)(XDR*, A*), int (*)(XDR*, R*), boost::function
), std::allocator<void> >) [with A = example_args, R = example_res]': rpc_server.cpp:277: instantiated from here rpc_server.cpp:171: error: cannot resolve overloaded function 'call_req' based on conversion to type 'int' make: *** [rpc_server.o] Error 1 I've attached rpc_server.cpp.
Can anyone tell me why the compiler doesn't have the information it needs? It seems to have figured out what types A and R are. What else does it need to resolve call_req?
The A and R parameters of set_handler have been resolved, but the A and R parameters of call_req haven't. Try bind( &rpc_server::call_req, ... ), and similarly for the other binds.