configure编译时,出现 configure: error: C compiler cannot create executables错误解决

文章来源: http://blog.csdn.net/tyyhong/article/details/4266749

 

 

我们在编译软件的时候,是不是经常遇到下面的错误信息呢?

 

checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

 

 

有很多人建议重装GCC,但是确无济于事。

 

这个错误产生的原因其实很简单: 由于我们在编译软件之前,进行了export操作,改变了CFLAGS和LIBS的值。

 

这个时候只要讲这个值清空就可以了。 

在linux的命令行中,输入下面的两行,清空CFLAGS和LIBS的值:

export LIBS=

export CFLAGS=

 

然后,就再运行./configue 等时,就可以正常通过了。

你可能感兴趣的:(c,linux,System,Build,compiler,output)