I have an executable compiled on a 64-bit machine using Code::Blocks and GCC compiler. I also have someone on a 32-bit machine that can't run the executable. Do I need to make two separate versions of the executable, or is there a way that I can compile it to run on both 32-bit and 64-bit systems?
You could use -m32 in gcc command line to build a 32-bit version. Please make sure your code is portable from 64-bit to 32-bit.