我想用C語言編寫一個使用GNU autotools的程序,但是我顯然設置了錯誤,因爲當configure
運行時,它吐出來:Autoconf問題:「錯誤:C編譯器無法創建可執行文件」
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 <[email protected]>"
| #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上構建失敗的方式相同,所以這絕對是我的錯,而不是環境。