解决方法:
定位有问题的stdio.h文件
找的 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
注释 _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
然后加上下面代码
#if defined(__GLIBC__) && !defined(__UCLIBC__) && !__GLIBC_PREREQ(2, 16) _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead"); #endif