第一处错误位于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的函数实现
第一处错误位于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的函数实现