Boost logo

Boost :

Subject: Re: [boost] [winapi] Default target Windows version
From: Lars Viklund (zao_at_[hidden])
Date: 2013-10-26 17:06:45


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_at_[hidden]

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk