Summery
Compilers are programs that translate source code written in a programming language into another form, such as machine code, bytecode, or another language.
Some languages, like Python, commonly execute source code through an interpreter rather than requiring a separate compilation step, but this has it’s own pros and cons.
Compilers
gcc - Is a simple compiler, it compiles C code to the OS it resides on. Can’t cross-compile.
Example: gcc -static 44298.c -o exploit
Sometimes gcc can’t find some path to it’s dependencies, you can specify the path to them with -B - gcc -B/usr/bin/ 50808.c -o exploit.
MinGW-w64 - Is a cross-compiler and it has a number of names depending on the architecture you choose.
x86_64-linux-gnu-gcc → 64-bit Linux
i686-linux-gnu-gcc → 32-bit Linux
x86_64-w64-mingw32-gcc → 64-bit Windows
i686-w64-mingw32-gcc → 32-bit Windows
aarch64-linux-gnu-gcc → 64-bit ARM Linux
arm-linux-gnueabihf-gcc → 32-bit ARM Linux
x86_64-w64-mingw32-g++ → 64-bit Windows (C++)
Syntax - x86_64-w64-mingw32-gcc adduser.c -o adduser.exe
If you want to make a .dll add --shared before the -o flag.
References
Similar concepts: Build tools, Installing Python modules and libraries