Linking an Executable - Example

Linking in C/C++ is the process of combining compiled object files and libraries into a single executable program.

llvm-g++ main.o testFifo.o ../TEST/library.lib ../COL/library.lib -o test 
  • The output binary is called test - we are using the -o flag.

  • The inputs are two object files and two library files.

In POSIX executables have no extension. In Windows they typically end in *.exe.

Related pages