I am trying to compile a c program to 32 bit from a 64 bit linux gcc.This is the full c code:https://raw.githubusercontent.com/h4r1337/wentlisp/main/main.c
But when I tried compiling it with -m32
flag this error shows up.
$ cc -m32 -std=c99 main.c -o main.out ledit/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libedit.so when searching for -ledit/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libedit.a when searching for -ledit/usr/bin/ld: cannot find -ledit: No such file or directory/usr/bin/ld: skipping incompatible /usr/lib/x86_64-linux-gnu/libedit.so when searching for -leditcollect2: error: ld returned 1 exit status
I already installed gcc-mltilib
and g++-multilib
$ sudo apt-get install gcc-multilib g++-multilib
I am a beginner c programmer and trying out and learning new things. I couldn't find anything useful from google or I am not that good at googling specific errors. Can anyone please help...