The official Audacity download has an exe built for XP (subsystem 5.01), but it uses wxWidgets DLLs built for Vista and later (subsystem 6.00). Presumably, the 2.1.2 wx DLLs were built with the default VS2013 C++ configuration, v120 whereas the Audacity was built with v120_xp. If so, then they were likely built with different SDKs. Mixing such things is not, to the best of my understanding, something supported by Microsoft.
One way to avoid this problem is to build wxWidgets with the v120_xp configuration. A diff against wxWidgets v3.1.0 can be found here: props.diff. The build system is different for earlier versions wxWidgets, so the change isn’t as localized, but the idea is the same: the "v120"s need to become "v120_xp"s.
Alternately, one could drop XP support.
Here’s truncated dumpbin output from some of the files in the 2.1.2 download (note the “subsystem version”):
audacity-win-2.1.2\Audacity>dumpbin /headers audacity.exe Microsoft (R) COFF/PE Dumper Version 14.00.23918.0 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file audacity.exe PE signature found File Type: EXECUTABLE IMAGE FILE HEADER VALUES 14C machine (x86) 5 number of sections 5691052F time date stamp Sat Jan 9 06:03:43 2016 0 file pointer to symbol table 0 number of symbols E0 size of optional header 103 characteristics Relocations stripped Executable 32 bit word machine OPTIONAL HEADER VALUES 10B magic # (PE32) 12.00 linker version 48D400 size of code 49B200 size of initialized data 0 size of uninitialized data 425600 entry point (00825600) 1000 base of code 48F000 base of data 400000 image base (00400000 to 00D2BFFF) 1000 section alignment 200 file alignment 5.01 operating system version 0.00 image version 5.01 subsystem version
audacity-win-2.1.2\Audacity>dumpbin /headers wxmsw30u_core_vc_custom.dll Microsoft (R) COFF/PE Dumper Version 14.00.23918.0 Copyright (C) Microsoft Corporation. All rights reserved. Dump of file wxmsw30u_core_vc_custom.dll PE signature found File Type: DLL FILE HEADER VALUES 14C machine (x86) 5 number of sections 5679D100 time date stamp Tue Dec 22 15:38:56 2015 0 file pointer to symbol table 0 number of symbols E0 size of optional header 2102 characteristics Executable 32 bit word machine DLL OPTIONAL HEADER VALUES 10B magic # (PE32) 12.00 linker version 22EC00 size of code 223000 size of initialized data 0 size of uninitialized data 1FF64D entry point (101FF64D) 1000 base of code 230000 base of data 10000000 image base (10000000 to 10454FFF) 1000 section alignment 200 file alignment 6.00 operating system version 0.00 image version 6.00 subsystem version