Using the IncrediLink Option
This section describes how to speed up incremental links in Visual
Studio .NET and 2005 using the IncrediLink option.
Overview
The IncrediLink option can speed up incremental links from several
minutes to as little as a few seconds. It does this by combining
Visual Studio's incremental linking option and modifying the
link.exe command line so that references to LIB files are replaced
by references to the OBJ files that make up that LIB file (wherever
possible). The latter modification is required in order for the
incremental linking feature to be effective in solutions consisting
of LIB projects which are linked into the main project(s).
Enabling IncrediLink
To turn on IncrediLink, check the "By default, enable IncrediLink"
option in the Agent Settings dialog Visual Studio
Builds->General page.
Two modes are available when this option is active:
- According to "Enable Incremental Linking" project
setting - in this mode IncrediLink will be activated only for
projects that have "Incremental Linking" turned on. Note that since
incremental linking is enabled by default, this includes all
projects that don't have Incremental Linking specifically
disabled.
- For all projects - in this mode IncrediLink will be
activated for all projects.
- The Do not create libraries checkbox controls whether
IncrediBuild will skip the link step of LIB projects whose OBJ
files IncrediLink embeds into their parent project's link command
line. Since these LIB projects' OBJ files are linked into the main
executable/DLL, it is often possible to save additional build time
by avoiding these LIB projects' link step.
For Visual Studio 2005 builds, a choice is given between the
standard mode of operation ("According to IncrediBuild default
setting") or the "According to 'use Library Dependency Inputs'
project option" setting which will cause IncrediLink to be
activated only for projects which have this setting activated in
the project's properties (the 'Use library Dependency Inputs'
property is Visual Studio 2005's equivalent setting to
IncrediLink).
Note that IncrediLink will only affect linkage of DLL and EXE
projects.
Considerations
There are a few things to consider with this feature turned on:
- Duplicate Symbol link error messages may show up if different
library projects include define the same symbol twice; the reason
is that the linker is more tolerant to duplicate symbols residing
in libraries than it is to duplicate symbols being defined in
different object files. If this happens, change your code to
include each symbol definition once.
- Missing Function body link errors may show up. To workaround
this, add function body stubs to your code.
- Symbols which are not referenced anywhere in the code will
still be included in the final output (with regular links they will
be ignored).
Copyright (C) 2001-2008 Xoreax Software Ltd. All rights
reserved.