我正在尝试使用 GNU autotools 构建我用 C 语言编写的程序,但我显然设置错误,因为configure
运行时,它会吐出:
configure: error: C compiler cannot create executables
如果我查看config.log
,我会看到:
configure:2846: checking for C compiler default output file name
configure:2868: gcc conftest.c >&5
conftest.c:3:25: warning: missing terminating " character
conftest.c:4: error: expected '=', ',', ';', 'asm' or '__attribute__' before ':' token
configure: failed program was:
| /* confdefs.h. */
| #define PACKAGE_NAME "Jackoff"
| #define PACKAGE_TARNAME "jackoff
| http://github.com/enaeseth/jackoff"
| #define PACKAGE_VERSION "0.1"
| #define PACKAGE_STRING "Jackoff 0.1"
| #define PACKAGE_BUGREPORT "Eric Naeseth <enaeseth@gmail.com>"
| #define PACKAGE "jackoff
| http://github.com/enaeseth/jackoff"
| #define VERSION "0.1"
| /* end confdefs.h. */
|
| int
| main ()
| {
|
| ;
| return 0;
| }
出于某种原因,autoconf 正在生成一个无效的测试文件:该行上应该是什么,只是一个分号?在 Ubuntu 9.04 和 Mac OS X 10.6 上构建失败的方式相同,所以这绝对是我的错,而不是环境的错。