执行./configure命令出现如下奇怪的错误,百思不得姐:
./configure命令的日志文件为config.log,发生错误时,该文件的内容:
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.configure:538: checking for gcc
configure:615: checking whether the C compiler (gcc ) works
configure:629: gcc -o conftest conftest.c 1>&5
configure:626:1: error: return type defaults to 'int' [-Wimplicit-int]626 | main(){return(0);}| ^~~~
configure: failed program was:
#line 625 "configure"
#include "confdefs.h"
main(){return(0);}
继续查看configure文件:
在main()函数前加"int",执行./configure,ok!搞定!
别急!还有,学到了什么?linux上的开发错误,除了一些常见的,很多错误需要自己找原因,你就是一个完整的OS!