Information Technology Reference
In-Depth Information
Working with Advanced Build Techniques
So far, the build process has been treated as a “black box” that does its job after it's initialized with a standard
list of build settings. This is adequate for simpler apps, but for more complex projects, it can be useful to break
apart the build process and customize it further.
Understanding the build process
In outline, the build process has four stages:
1. Preprocessor
2. Compiler
3. Linker
4. File copier and processor
The preprocessor makes working copies of the original source files, expanding #include directives to include
the original headers, expanding macros (low-level reusable code snippets and definitions), and implementing
conditional compilation. Conditional compilation uses directives such as #if and #ifdef to test compiler
and system settings and select code according to their values.
Internally, the preprocessor is more complex than this simple description suggests, but a full introduction is
outside the scope of this topic. The key practical point is that you can use preprocessor directives to include
and exclude code automatically according to various system, platform, and build settings.
Search WWH ::




Custom Search