Compiling Separately
There are no standards for compiler or linker command names. The following commands compile the modules and link them together using a fictional compiler (cppcompiler) and linker (cpplinker) under Windows:
|compiling|commands
|commands|compile
cppcompiler PromptModule.cpp cppcompiler ErrorHandlingModule.cpp cppcompiler Main.cpp cpplinker Calculator.exe Main.obj PromptModule.obj ErrorHandlingModule.obj
A compiler typically produces an intermediate file, whose name often ends in .obj or .o (it is sometimes called an object file even though it has nothing to do with object-oriented programming). The linker combines these files into an executable file (under Windows a .exe file, under Unix a file with no extension). The operating ...
Get SAMS Teach Yourself C++ in 10 Minutes SECOND 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.