Compile multiple source files into executable

gcc

  • Preprocess and compile C and C++ source files, then assemble and link them together.
    More information: <https://gcc.gnu.org>.
  • Trick copyright: tl;dr; <https://github.com/tldr-pages/tldr>

gcc {{path/to/source1.c path/to/source2.c ...}} -o {{path/to/output_executable}}

click the source code to copy install gcc on any operating system with command-not-found.com