Posts
read more
Compiling 32-bit C/C++ Programs on 64-bit
By default, gcc will compile your c/c++ program to 64-bit instructions. In order to compile to 32-bit you need to add a -m32 flag to the command line. For example, to compile a file called hello-world.c using a Linux terminal, you would do something like this:
$ gcc -m32 hello-world.c -o hello-world
If you get the following error:
fatal error: bits/predefs.h: No such file or directory