As such, an executable built using vNext and run on Windows XP will attempt to use functions that do not exist in say, for example, kernel32.dll. Now, the reason vNext does not support Windows XP is because the MFC and CRT libraries have been built to assume symbols available on Vista or greater. As such, it is possible to override what gets imported into an executable for compilation. When the linker is searching for a symbol, it uses the first version of a symbol it finds and imports that object. Now, the final thing to understand is order. Now, the statically linked versions of these libraries use exactly the same names to link against - except that the relevant implementation is pulled directly into the executable. When Windows runs your executable, the import library pulls in the right references, and the stub functions call the real functions.
This all happens at compile time dynamic linking on Windows often uses an import library to symbols that look like this: _imp_ Static linking is the easier of the two to understand - you look for a symbol and you change all references to that symbol to the relative address from the base of the executable.
There are two ways to link an executable statically or dynamically. So we can understand how Ted’s solution works, we’ll begin with a quick primer on linker resolution. It turns out were are not the only ones interested in XP support, and Ted had a solution. However, we were keen to start using the latest and greatest features of Visual Studio 11 now, especially with our soon to be unleashed beta code.
Indeed, the latest news is that XP Support will not ship with the RTM, however, it may be supplied later at an unspecified date. We certainly were however, a significant number of our customers still use and need to back up and restore Windows XP systems, so the news that vNext Beta would not support building executables for Windows XP was a showstopper for us. If you’ve been following Visual Studio development at all, you’ll no doubt be very interested in the Visual Studio 11 Beta, especially as it ships with a go live license.