Using gcc -m32 flag cannot find -lgcc and -lgcc_s

I am trying to compile 32-bit assembly code (NASM) on my 64-bit Linux, but I can’t, I tried other tutorials about this and I installed ia32-libs ...

When I try to run it like:

gcc asm1.o -o asm1

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

And when I try to run it like:

gcc -m32 asm1.o -o asm1

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

Thanks for the help.

OBS: Sorry for my English, I'm not from the USA.

+4
source share

Source: https://habr.com/ru/post/1530925/


All Articles