歡迎您光臨本站 註冊首頁

gcc 使用問題求助:"incompatible with i386:x86-64 output"

←手機掃碼閱讀     火星人 @ 2014-03-23 , reply:0

我練習使用靜態庫編程時,按書上內容輸入:

"gcc -o usehello_static usehello.c libhello.a"

結果提示:

"/usr/bin/ld: i386 architecture of input file `libhello.a(libhello.o)' is incompatible with i386:x86-64 output
collect2: ld 返回 1"

沒有生成執行文件,該怎麼解決?(5ty(




------------------------


我是在vmware中裝的ubuntu7.10 for amd64。 另外,使用的庫文件和c源文件都來自此書的附贈光碟。


我的CPU是:AMD Athlon(tm) 64*2 Dual Core Processor 4200+ 2.20GHz

gcc版本4.1.3

gcc 的 manual 有幾百頁,也不知道往哪裡找參考。

[火星人 ] gcc 使用問題求助:"incompatible with i386:x86-64 output"已經有483次圍觀

http://coctec.com/docs/linux/show-post-110931.html