Boost logo

Boost-Build :

Subject: [Boost-build] 64-bit with VS Express (again)
From: David Abrahams (dave_at_[hidden])
Date: 2010-11-15 15:27:38


Maybe this has been completely covered somewhere already. If so,
please let me know, but...

To build 64-bit binaries on Windows with the free VS 2010 Express, you
need to install the platform SDK, which contains the 64-bit tools.

The platform SDK also contains a script for setting up the tools,
c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd

If I build with address-model=64, BB tries to invoke:

  c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/vcvarsall.bat x86_amd64

which will try to call

  c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/vcvarsx86_amd64.bat

which doesn't exist with VS 2010 Express. On the other hand, the
latest SDK comes with

  c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd

which can be used to do all the same setup and more:

  Usage: "Setenv [/Debug | /Release][/x86 | /x64 | /ia64][/vista | /xp | /2003 | /2008 | /win7][-h | /?]"

                  /Debug - Create a Debug configuration build environment
                  /Release - Create a Release configuration build environment
                  /x86 - Create 32-bit x86 applications
                  /x64 - Create 64-bit x64 applications
                  /ia64 - Create 64-bit ia64 applications
                  /vista - Windows Vista applications
                  /xp - Create Windows XP SP2 applications
                  /2003 - Create Windows Server 2003 applications
                  /2008 - Create Windows Server 2008 or Vista SP1 applications
                  /win7 - Create Windows 7 applications

  Note:
  * Platform(x86/x64/ia64) and PlatformToolSet(v90/v100/WindowsSDK7.1) set in project or solution will override the environment
  * To upgrade VC6 or later projects to VC2010 format use the VCUpgrade.exe tool.

so right now, I'm having some success by creating

 c:/Program Files (x86)/Microsoft Visual Studio 10.0/VC/bin/x86_amd64/vcvarsx86_amd64.bat

containing just

  call "c:\Program Files\Microsoft SDKs\Windows\v7.1\Bin\setenv.cmd"

However, it seems to me that BB is broken for this configuration, as
it ought to be invoking the script from the PSDK directly.
Your thoughts/criticisms/vitriol/adulation appreciated.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com
-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk