question about intermediate file

  • Thread starter Thread starter Johnson
  • Start date Start date
J

Johnson

I am using Visual C++ 2008 Express Edition, and the host computer runs
Windows Vista 32 bit. If I build a project, is there any intermediate
files generated (.assembly, .class, .module etc.)? Or just the obj files?

I have also heard that The compiler may create other intermediate files
as well, but they will be deleted automatically once the compile is
finished. Is it true?

Thanks.

Johnson
 
You are probably confusing "temporary" files with "intermediate" files for
starters. The compiler/linker may well generate other "temporary" files
during its operation but the point of that is that they are temporary, and
should get cleaned up automatically, unless your compiler crashes perhaps.

Intermediate files generally don't get cleaned up unless you "Clean" the
project, because the whole point of an intermediate file is to retain a
partially built item that feeds into the build process. For example, an OBJ
file or a LIB file contains the necessary link-level information, and
generated code, to allow the linker to function. Link-level information is
not actually needed in the final EXE (unless it is being embedded for
debugging reasons). If a particular source file has not changed from one
build to the next, then the corresponding OBJ does not need to be
regenerated, and since compilationis expensive in both compute and I/O
terms, you definitely don't want that intermediate file disappearing at the
end of each compile.

Some other intermediate files don't feed into the build process so much as
help the develop/debug process, such as .PDB (debugger) files. In a similar
fashion you only want to regenerate this file if the EXE changes, not
everytime you run the application in the debugger.

It should not be something that you particularly worry about. The most
important thing is that when you deploy/package your application don't
include extraneous stuff (like said intermediate files) that have no
function on the target host (ie. *not* the development host) and only serve
to bloat the installer's size.
 
Back
Top