Custom Preprocessor as Custom Build Step
interesting method of using strings as object IDs. Since strings are
expensive to compare at runtime, hashes of those strings are often used
for comparison and identification. The article suggested using a
custom "macro" called HASH() which would be evaluated to a CRC hash
value during the build. For example:
//in the source code Load(HASH("MDL_MECH01_LARGE"));
//the same line after the custom build step: Load(0x334BDCF8);
The benefit of this method is that the programmer doesn't need to worry
about the hashes of the strings, and there are no hashes done at
runtime. How are situations like this normally handled with custom
build steps? Do I have to add two copies of all of the source files to
my projects (the input and the output)? Or is it possible for me to
work with the VS preprocessor outputs before they are compiled?
Thanks for any help,
Thaedrys
PS: I'm working in VS 2005 and not using the .NET libraries.

