ld: i386 architecture of input file `exit.o' is incompatible with i386:x86-64 output

来源:互联网 发布:公司域名注册 编辑:程序博客网 时间:2024/05/22 00:51

编译一个简单的汇编文件,然后链接出现的时候这个问题。

情景再现:

$nasm -f elf exit.asm

$ld exit.o -o exit

出现下面的结果:


在网上搜了一下解决方案:


之后再执行链接就不会报错了。。。。


0 0
原创粉丝点击