Skip to content
Linking 32-bit libc in repl.it
Profile icon
Wuru

Linking 32-bit libc in repl.it

Using gcc to link, when you want to link using 32-bit libc you type something like:

# install required packages sudo get-apt install gcc-multilib # link gcc -m32 file.o -o file

I have a repl hosted on repl.it that I need to use this in, how could I do that?

You are viewing a single comment. View All
Profile icon
19wintersp

Are you sure you need to do this with gcc-multilib? Can't you just use clang -m32? If you need to install a package, use install-pkg <package name>:

install-pkg gcc-multilib
Profile icon
Wuru

The assembly code im using (with the command as --32 file.s -o file.o ) is 32 bit and cannot link with the x86_64 libc.

@19wintersp