當我試圖編譯C程序鏗鏘編譯器,我得到這個消息鏘連接器和i686的
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/crt1.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/crti.o' is incompatible with i386 output
/usr/bin/ld: i386:x86-64 architecture of input file `/usr/lib/gcc/i686-linux-gnu/4.6.1/../../../../lib/crtn.o' is incompatible with i386 output
clang: error: linker command failed with exit code 1 (use -v to see invocation)
我怎樣才能解決這個問題呢? 如果它是很重要的:
$ uname -a
Linux asus 3.0.0-17-generiC#30-Ubuntu SMP Thu Mar 8 17:34:21 UTC 2012 i686 i686 i386 GNU/Linux
這是不尋常的;你有一個32位系統,但你的庫是64位的?你是否從源碼安裝了任何庫? – trojanfoe 2012-04-16 14:08:40
升級到Ubuntu 11.10 – 2012-04-16 14:41:37
後,32位庫被替換爲64位但內核不是?我認爲你的系統壞了。 – trojanfoe 2012-04-16 14:46:25