Since Windows XP is no longer supported, Microsoft has updated its default linking settings. Unless one is able to relink executable file, there is no simple way to run application compiled by new MSVC on old Windows versions. The reason why such programs should not be run on old OS versions is very simple - there is no maintenance support any more (it is not 100% true). Nonetheless, if one desires to run newly build application on an old box, then basically there are three options:
- get executable for your OS version
- recompile from source using proper linking options
- modify PE header using hex editor
If the first two are not possible (they are recommended, though), then one can use this tool - WinPEFix.
It will do the dirty job of overwriting the PE file's header, in order to allow to run any application on Windows XP (bare metal version 5.01). I mean "to allow", not "to run" - there might be incompatibilities beyond targeting issue.
In order to compile this tool, one has to have access to a box with a CMake and compiler with C++11 support. On Windows system, there are no external dependencies required, so once the program is compiled, it should run from anywhere. On other platforms Qt is used for user interface.
- Run WinPEFix tool
- Select EXE file along with all required DDLs
- Process...
- ????
- Profit!!!