The Compilation Process: Compile, Link, Go

UnderC is quick at getting programs running, but not very fast at executing them. Once you are happy with your program and need to generate a standalone .EXE file, you need to build the program using a C++ compiler and linker.

A C++ compiler translates .cpp files into object files that contain machine code. These files can't be executed immediately because they contain unresolved references to other functions, some of which are in the other object files of the project but most of which are contained in the libraries. In the case of GCC, the object files end in .o, and the library files end in .a (for “archive”). For BCC32 and Microsoft C++ (CL), the object files end in .obj, and the library files end ...

Get C++ By Example: UnderC Learning Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.