如果是ubuntu20版本,或者gcc版本太高,可能有些警告会当成错误导致编译出错:
error: ‘’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1plus: some warnings being treated as errors
确认gcc版本
gcc -v 1
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
最新推荐文章于 2024-08-25 10:36:41 发布
南苏月 于 2022-04-09 10:49:51 发布
版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。
如果是ubuntu20版本,或者gcc版本太高,可能有些警告会当成错误导致编译出错:
error: ‘’ may be used uninitialized in this function [-Werror=maybe-uninitialized]
cc1plus: some warnings being treated as errors
确认gcc版本
gcc -v 1
gcc version 9.4.0 (Ubuntu 9.4.0-1ubuntu1~20.04.1)
网址:警告当当成错误 may be used uninitialized in this function [ https://www.yuejiaxmz.com/news/view/49702