5.4 Object code files

After a source file is compiled (succesfully), an object file is generated. An object file contains definitions of subroutines and variables. It also contains unresolved external references to subroutines and variables. An object file (in C and C++) does not include class or struct defintions, enum definitions or any macro definitions. This is why such items (enum, macro, class and struct definitions) are found in header files.

In order to practice ``least privilege'' exposure, a consumer source file should work with only the object code file and header file from a data type provider. A consumer source file should not need the source file from a data type provider.



Copyright © 2006-09-07 by Tak Auyeung