Boost logo

Boost :

Subject: Re: [boost] [winapi] Default target Windows version
From: Lars Viklund (zao_at_[hidden])
Date: 2013-10-25 20:14:56


On Fri, Oct 25, 2013 at 10:54:52PM +0200, Vicente J. Botet Escriba wrote:
> Le 23/10/13 15:12, Andrey Semashev a écrit :
>> On Wednesday 23 October 2013 16:35:33 Sergey Cheban wrote:
>>> There any many users of Windows XP. For them, the Windows XP Lifecycle ends
>>> at 08 Apr 2014. I see no reason to introduce any problems with WinXP
>>> compatibility before this date. On the other hand, I see no reasons to keep
>>> WinXP supported by default after it's official death.
>> Ok, sounds reasonable. I changed the default back to XP.
>>
> Hi Andrey,
>
> I was wondering if we don't need here a different toolset on bjam so
> that we can deliver both the XP and the Vista libraries.
>
> Apologies if I missed some important parts of the thread.

The last time I tried raising the problem of toolsets (back in v110_xp)
I was pretty much laughed out of the room for being silly enough to run
Windows, and to think that it was worth targetting XP.

In any way, I've settled personally for largely following the
instructions in [1], apart from the extraneous ;%CL% on the CL and LINK
variables.

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.

You may have to use SUBSYSTEM:WINDOWS instead of SUBSYSTEM:CONSOLE, I
don't know if it should matter for DLLs.

[1] http://blogs.msdn.com/b/vcblog/archive/2012/10/08/10357555.aspx

[2]
---8<---
set INCLUDE=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Include;%INCLUDE%
set PATH=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Bin;%PATH%
set LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib;%LIB%
set CL=/D_USING_V110_SDK71_

When targeting x64, set the lib path as follows:
set LIB=%ProgramFiles(x86)%\Microsoft SDKs\Windows\7.1A\Lib\x64;%LIB%

Specify the correct subsystem and subsystem version for the linker based
on the type of application you are building. Applications targeting the
x86 version of Windows XP must specify subsystem version 5.01, and
applications targeting x64 must specify version 5.02.

For x86 console applications:
set LINK=/SUBSYSTEM:CONSOLE,5.01

For x64 console applications:
set LINK=/SUBSYSTEM:CONSOLE,5.02
---8<---

-- 
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