/usr/bin/ld: i386:x86-64 architecture of input file `command.o' is incompatible with i386 output
出現這種警告的時候的時候,運行程序老是段錯誤,要加-m32,就好了。
gcc -m32 -o usehello_static usehello.c libhello.a
原因引用的庫是 32位的,我是用的64位的系統
/usr/bin/ld: i386:x86-64 architecture of input file `command.o' is incompatible with i386 output
出現這種警告的時候的時候,運行程序老是段錯誤,要加-m32,就好了。
gcc -m32 -o usehello_static usehello.c libhello.a
原因引用的庫是 32位的,我是用的64位的系統
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。