Please consider that this intrusive sentence could instead be proclaiming that you help sponsor this research.
Home > Programming > Tools > Visual C++ > Compiler > Options
The /Bk option arranges that intermediate files be kept after compilation and optionally specifies their locations and names.
/Bk[pathname]
The optional pathname follows immediately within the one command-line token.
This option has no syntactic relations with other options.
However, it does influence the -il option that passes to all the compiler modules.
Compilation of any one source file typically involves creation of some number of intermediate files by one or another of the compiler modules, mostly to pass information from the front-end to the back-end. Unlike object files however, they are not an end-product of compilation and are ordinarily deleted by CL.EXE once compilation completes (successfully or not).
The general plan is that the intermediate files from any one source file are all in the one directory and all have their names formed by appending a two-letter code to a common template. The directory is by default whatever is named by the TMP environment variable. The template is by default the four characters of _CL_ followed by three lower-case letters and five decimal digits. The expected two-letter codes are db, ex, gl, in, lk, md and sy. The pathname in the /Bk option specifies the directory and template, as if by giving a pathname for an intermediate file that has no two-letter suffix.
The pathname, whether given through /Bk or constructed by default, passes to each of the compiler modules (front and back, but also the ordinarily by-passed middle) as the argument to a -il option.
Use of /Bk with a pathname affects the order of execution for builds that have more than one source file. The usual order is to execute the same compiler module for as many source files as possible before proceeding to another compiler module. This order requires a different template for each source file. When a template is given explicitly, each source file is compiled to completion before proceeding to another source file. The intermediate files that are kept at the end of the build relate to the last C/C++ source file that was compiled.
This page was created on 27th October 2005. The last significant modification was on 7th April 2006.
Copyright © 2005-2006. Geoff Chappell. All rights reserved.
Please consider that this intrusive sentence could instead be proclaiming that you help sponsor this research.
Home > Programming > Tools > Visual C++ > Compiler > Options
[Home][Programming Samples][Application Notes][Security Notes][Editorial][Consultation][Contacts]