On Sat, Oct 26, 2013 at 03:17:10PM -0400, Niall Douglas wrote: Content-Description: Mail message body
On 26 Oct 2013 at 2:14, Lars Viklund wrote:
The following steps works for v110_xp and v120_xp.
* Open your usual Visual Studio command prompt. * Set INCLUDE, PATH, LIB, CL, LINK. * Clean out your build tree completely. * Build+install/stage w/ toolset=msvc-11.0 or msvc-12.0. * Pray it/Boost didn't screw something up and end up as crashes/failure-to-launch on XP machines.
I am surprised that this works. Boost.Build appears to ignore the command line environment you launch it within, and so always chooses the default toolset for msvc-12.0, therefore producing binaries which ought to fail to launch on XP.
BTW, if you statically link your VS2012 executable as a DLL, and then use a loader shim on XP to load that DLL and call its entry point, you generally get away with it working just fine. In the end the VS2012 MSVCRT doesn't use that many Vista only kernel APIs yet.
It might be quite possible that some of it is completely ineffective, but the end result is that I can deploy software linked against static Boost libraries to XP. I believe some of those environment variables are honored by the tools internally (INCLUDE/LIB/LINK/CL). In any way, it "works" for some particular definition of "works". My DLLs end up with the right subsystem version, for example. -- Lars Viklund | zao@acc.umu.se