Download source files - 1 Kb
When installing the Microsoft Platform SDK, you can choose to install
WTL (Windows Template Library) source files, a collection of MFC-like
classes that make GUI development a bit easier without the overhead
imposed by "True-MFC". Unfortunately, the default installation does not
enable immediate usage of WTL in Visual Studio (the complier can not find
#included WTL headers even though WTL has been installed).
This Perl script was written to automate the update of WTL. No
input is required from the user and all arguments are ignored. We will
define update as a process of making WTL available to
projects in Visual Studio (i.e.
#includes will successfuly
locate WTL files).
First, we suppose you have installed Microsoft Platform SDK with at least the following options:
- Selected "Configuration Options/Integrate with MS Visual C++"
- Selected "Configuration Options/Register Environment Variables"
- Selected "Source Code/Windows Template Library"
Readme.txt file provided by Microsoft says it is is enough to copy header files from WTL source directory to one of include directories (directory that is searched when compiler looks for
#includes). MS SDK installer registers path
%MSSDK%/Include/Atl30 as the first include directory. Therefore the script first looks for the "MSSDK" environment value (path of the SDK installation). Then, files in
%MSSDK%/Include/Atl30 (target) are updated with files from
%MSSDK%/Src/WTL/Include (source). The update procedure evaluates time stamp difference between target file (if any) and source file. Each comparison may have one of those outcomes:
- No target file: copy source file to target
- Target and source files have the same time stamp: do not update target
- Target is newer than source: issue warning and do not update target
- Target is older than source: overwrite target with newer source file
You can also use this script with further releases of MSSDK. After installing newer Platform SDK the script will ensure that
%MSSDK%/Include/Atl30 contains current versions of WTL source files (all older files will be automatically replaced with new (installed) versions).
Another way to update WTL would be to update a list of directories that Visual Studio scans
when looking for
#included files. This script tried to follow recommendation
- Update not only sources, but also application wizard file. That means copy awx
files from WTL install directory to Visual Studio wizard directory. The only problem is
how to locate Visual Studio installation path...
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.