chenshuo / muduo-protorpc

Google Protobuf RPC based on Muduo
Other
196 stars 106 forks source link

编译muduo-protorpc遇到的两处错误 #1

Open robsys-test opened 5 years ago

robsys-test commented 5 years ago

第一处错误位于examples/zurg/slave/Heatbeat.h 编译错误:error: expected class-name before ‘{’ token{ 解决办法:添加头文件#include <muduo/net/EventLoop.h>

第二处错误位于examples/zurg/slave/SlaveService.cc 编译错误:error: ‘std::map<muduo::StringPiece, muduo::StringPiece>::mapped_type {aka class muduo::StringPiece}’ has no member named ‘CopyToStdString’ 解决办法:这里我将CopyToStdString改为CopyToString,因为在muduo库中没有找到CopyToStdString的函数实现

chenshuo commented 5 years ago

欢迎提 Pull Requests.