I’m trying to compile a binary with -m32 flag but keep getting the following error: /usr/bin/x86_64-linux-gnu-ld: i386 architecture of input file `FILENAME’ is incompatible with i386:x86-64 output
I know this is an error invovling a 32bit link to a 64bit library, but how do I get it to link to the 32bit library?
My setup is as follows:
Ubuntu 18.04 running in VMWare
Build tool is MS Build with the -m32 added to the C/C++ Advanced project tab, in additional flags.
I’ve installed the following on the VM, and a compile and link in the VM succeeds: libc6:i386 libncurses5:i386 libstdc++6:i386 g++-multilib build-essential