Search code examples
c++g++exetar

How to make exe/tar.bz2 from .o file in G++?


Is there any way to make exe or tar.bz2 file from .o file in G++? Must I use nasm or any else program for making axe and tar.bz2, or it is possible in G++?


Solution

    • To make an exe, use the linker: g++ -o myprog myob1.o myob2.o

    • To make a compressed archive, use tar: tar cjf myarchive.tar.bz2 /path/to/all/my/files/

    • To make an axe, use two sticks and three diamonds.