使用 gcc -m32 标志找不到 -lgcc 和 -lgcc_s [英] using gcc -m32 flag cannot find -lgcc and -lgcc_s

查看:57
本文介绍了使用 gcc -m32 标志找不到 -lgcc 和 -lgcc_s的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在我的 64 位 Linux 上编译 32 位汇编代码(NASM),但我不能,我已经尝试了其他教程,我安装了 ia32-libs...

I'm trying to compile a 32 bit assembly code(NASM) on my 64 bit Linux, but I can't, I have tried others tutorials about it and I installed ia32-libs...

当我尝试将其运行为:

gcc asm1.o -o asm1

文件输入 `asm1.o' 的 i386 与输出 i386:x86-64 不兼容

i386 of the file input `asm1.o' is incompatible with the output i386:x86-64

当我尝试将其运行为:

gcc -m32 asm1.o -o asm1

/usr/bin/ld: 找不到 -lgcc/usr/bin/ld: 找不到 -lgcc_scollect2:错误:ld 返回 1 个退出状态

/usr/bin/ld: cannot find -lgcc /usr/bin/ld: connot find -lgcc_s collect2: error: ld returned 1 exit status

感谢您的帮助.

OBS:对不起我的英语,我不是来自美国.

OBS: Sorry for my english, I'm not from US.

推荐答案

需要安装gcc-multilib.

这篇关于使用 gcc -m32 标志找不到 -lgcc 和 -lgcc_s的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆