These instructions assume you have Visual Studio 2012 or Visual Studio 2012 Express edition installed along with boost 1.54.
Change the content of the below files in boost folder( which is downloaded and extracted)
In boost_1_54_0\tools\build\v2\tools
change the following files:
1. msvc.jam
Change:
toolset.flags msvc LINKFLAGS <user-interface>console : /subsystem:console ;
to this for 32 bit:
toolset.flags msvc LINKFLAGS <user-interface>console : /subsystem:console,5.01 ;
or this for 64 bit:
toolset.flags msvc LINKFLAGS <user-interface>console : /subsystem:console,5.02 ;
2. msvc.py
Change:
toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>console'], ['/subsystem:console'])
to this for 32 bit:
toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>console'], ['/subsystem:console,5.01'])
or this for 64 bit:
toolset.flags('msvc', 'LINKFLAGS', ['<user-interface>console'], ['/subsystem:console,5.02'])
In boost_1_54_0\tools\build\v2\engine
change the following files:
1. build.bat
Change:
if EXIST "%ProgramFiles%\Microsoft Visual Studio 11.0\VC\VCVARSALL.BAT" (
to:
if EXIST "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\VCVARSALL.BAT" (
Above the line that reads :Skip_VC11
, change:
set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
to:
set "BOOST_JAM_CC=cl /nologo /RTC1 /Zi /MTd /Fobootstrap/ /Fdbootstrap/ /D _USING_V110_SDK71_ -DNT -DYYDEBUG -wd4996 kernel32.lib advapi32.lib user32.lib"
Open a standard command prompt and type the following commands:
call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
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%
cd <path to boost_1_54_0>
bootstrap
For 32 bit, use the command:
b2 toolset=msvc-11.0 variant=debug,release link=shared runtime-link=shared address-model=32
or for 64 bit:
b2 toolset=msvc-11.0 variant=debug,release link=shared runtime-link=shared address-model=64
To compile any sample for release and debug versions, do the following:
Open a standard command prompt and type the following commands:
call "%ProgramFiles(x86)%\Microsoft Visual Studio 11.0\VC\bin\vcvars32.bat"
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%
cd to the directory of the sample, ie boost_1_54_0\libs\test\tools\console_test_runner
<path to boost>\boost_1_54_0\bjam.exe --v2 toolset=msvc-11.0 variant=debug,release link=shared threading=multi runtime-link=shared