编译陈硕的muduo出现了问题 小白实在看不懂啊

叶树 2016-04-27 11:26:14
[ 21%] Building CXX object muduo/base/tests/CMakeFiles/singleton_test.dir/Singleton_test.cc.o
In file included from /home/wuliande/1/muduo/muduo/base/tests/Singleton_test.cc:1:0:
/home/wuliande/1/muduo/muduo/base/Singleton.h: In static member function ‘static void muduo::Singleton<T>::destroy()’:
/home/wuliande/1/muduo/muduo/base/Singleton.h:38:18: error: typedef ‘T_must_be_complete_type’ locally defined but not used [-Werror=unused-local-typedefs]
typedef char T_must_be_complete_type[sizeof(T) == 0 ? -1 : 1];
^
cc1plus: all warnings being treated as errors
make[2]: *** [muduo/base/tests/CMakeFiles/singleton_test.dir/Singleton_test.cc.o] 错误 1
make[1]: *** [muduo/base/tests/CMakeFiles/singleton_test.dir/all] 错误 2
make: *** [all] 错误 2
+ cd /home/wuliande/1/muduo
+ doxygen
Warning: Tag `SYMBOL_CACHE_SIZE' at line 289 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `SHOW_DIRECTORIES' at line 477 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `HTML_ALIGN_MEMBERS' at line 803 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: Tag `USE_INLINE_TREES' at line 956 of file Doxyfile has become obsolete.
To avoid this warning please remove this line from your configuration file or upgrade it using "doxygen -u"
Warning: doxygen no longer ships with the FreeSans font.
You may want to clear or change DOT_FONTNAME.
Otherwise you run the risk that the wrong font is being used for dot generated graphs.
/home/wuliande/1/muduo/muduo/base/FileUtil.cc:127: warning: no matching file member found for
template int muduo::FileUtil::readFile(muduo::StringPiece filename, int maxSize, __gnu_cxx::__sso_string *content, int64_t *, int64_t *, int64_t *)
Possible candidates:
'string readFile(const char *filename)' at line 13 of file/home/wuliande/1/muduo/examples/filetransfer/download.cc
'int readFile(StringPiece filename, int maxSize, String *content, int64_t *fileSize=NULL, int64_t *modifyTime=NULL, int64_t *createTime=NULL)' at line 53 of file/home/wuliande/1/muduo/muduo/base/FileUtil.h

/home/wuliande/1/muduo/muduo/base/FileUtil.cc:138: warning: no matching file member found for
template int muduo::FileUtil::readFile(muduo::StringPiece filename, int maxSize, std::string *content, int64_t *, int64_t *, int64_t *)
Possible candidates:
'string readFile(const char *filename)' at line 13 of file/home/wuliande/1/muduo/examples/filetransfer/download.cc
'int readFile(StringPiece filename, int maxSize, String *content, int64_t *fileSize=NULL, int64_t *modifyTime=NULL, int64_t *createTime=NULL)' at line 53 of file/home/wuliande/1/muduo/muduo/base/FileUtil.h

warning: Included by graph for 'Logging.h' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
warning: Included by graph for 'EventLoop.h' not generated, too many nodes. Consider increasing DOT_GRAPH_MAX_NODES.
...全文
1103 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
Shaw's Note 2020-01-18
  • 打赏
  • 举报
回复
引用 6 楼 红颜若雪 的回复:
把 muduo目录里面的CMakelist.txt中的 -Wall 去掉就可以编译通过了,gcc4.8以上在这个参数上附加了[-Werror=unused-local-typedefs
感谢老哥,解决了
红颜若雪 2019-08-05
  • 打赏
  • 举报
回复
把 muduo目录里面的CMakelist.txt中的 -Wall 去掉就可以编译通过了,gcc4.8以上在这个参数上附加了[-Werror=unused-local-typedefs
rubens1993 2016-10-30
  • 打赏
  • 举报
回复
引用 4 楼 rubens1993 的回复:
楼主,你解决这个问题了没啊?
可以看看这个 https://hg.mozilla.org/integration/mozilla-inbound/rev/43e4fecc8251
rubens1993 2016-10-30
  • 打赏
  • 举报
回复
楼主,你解决这个问题了没啊?
赵4老师 2016-04-27
  • 打赏
  • 举报
回复
use -Werror=unused-local-typedefs ?
ArthurJava 2016-04-27
  • 打赏
  • 举报
回复
typedef char T_must_be_complete_type[sizeof(T) == 0 ? -1 : 1]; 一个数组别名?
叶树 2016-04-27
  • 打赏
  • 举报
回复
什么意思 我有点蒙圈

3,881

社区成员

发帖
与我相关
我的任务
社区描述
C/C++ 其它技术问题
社区管理员
  • 其它技术问题社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧