Updated instructions for building the Boost C++ libraries

This commit is contained in:
Bill Somerville 2020-11-26 12:33:51 +00:00
parent 56f16cc023
commit 95cd992300
No known key found for this signature in database
GPG Key ID: D864B06D1E81618F

View File

@ -82,12 +82,12 @@ Common steps
Download and extract the latest Boost library sources, at the time of
writing that was
https://dl.bintray.com/boostorg/release/1.74.0/source/boost_1_74_0.7z
. Extract to some convenient location, I use %HOME%\src .
. Extract to some convenient location, I use %USERPROFILE%\src .
Download and extract the libbacktrace sources from
https://github.com/ianlancetaylor/libbacktrace as follows.
cd %HOME%\src
cd %USERPROFILE%\src
mkdir github.com
cd github.com
mkdir ianlancetaylor
@ -101,8 +101,8 @@ names are unique per architecture and tool-chain. This saves a lot of
space as the boost header files are quite big, and there's no need to
install multiple copies.
Create a new file %HOME%\src\boost_1_74_0\project-config.jam with the
following three lines to specify how Boost.Build finds the
Create a new file %USERPROFILE%\src\boost_1_74_0\project-config.jam
with the following three lines to specify how Boost.Build finds the
libbacktrace library matched to your relevant C++ compliers:
import toolset ;
@ -133,13 +133,15 @@ tool-chain bundled with your Qt binary installation. Verify the
correct compiler is in the PATH. i.e. it identifies (g++ --version) as
i686-posix-dwarf-rev0.
cd %HOME%\src\boost_1_74_0\tools\build
cd %USERPROFILE%\src\boost_1_74_0\tools\build
bootstrap.bat mingw
.\b2 --prefix=C:\Tools\boost-build\MinGW32 install
cd ..\..
C:\Tools\boost-build\MinGW32\bin\b2 -j8 toolset=gcc ^
--build-dir=%HOME%\build\boost ^
--build-type=complete --prefix=C:\Tools\boost install
--build-dir=%USERPROFILE%\build\boost ^
address-model=32 architecture=x86 variant=debug,release ^
link=shared threading=multi ^
--with-log --with-stacktrace --prefix=C:\Tools\boost install
If all is well you should see the following line about a 1/3 of the
way through the initial configuration steps.
@ -156,7 +158,7 @@ warnings can usually be ignored. If successful; you can release some
space by cleaning the build tree:
C:\Tools\boost-build\MinGW32\bin\b2 toolset=gcc ^
--build-dir=%HOME%\build\boost ^
--build-dir=%USERPROFILE%\build\boost ^
--build-type=complete clean
64-bit
@ -179,13 +181,16 @@ compilers and the project-config.jam file you created above. With a v7
gcc-8~64. My example matches my 64-bit Qt v5.15.0 with the bundled
MinGW64 v8.1.0.
cd %HOME%\src\boost_1_74_0\tools\build
bootstrap.bat
cd %USERPROFILE%\src\boost_1_74_0\tools\build
bootstrap.bat mingw
.\b2 --prefix=C:\Tools\boost-build\MinGW64 install
cd ..\..
C:\Tools\boost-build\MinGW64\bin\b2 -j8 toolset=gcc-8~64 ^
address-model=64 --build-dir=%HOME%\build\boost ^
--build-type=complete --prefix=C:\Tools\boost install
address-model=64 architecture=x86 variant=debug,release ^
link=shared threading=multi ^
--with-log --with-stacktrace ^
--build-dir=%USERPROFILE%\build\boost ^
--prefix=C:\Tools\boost install
If all is well you should see the following line about a 1/3 of the
way through the initial configuration steps.
@ -202,9 +207,8 @@ warnings can usually be ignored. If successful; you can release some
space by cleaning the build tree:
C:\Tools\boost-build\MinGW32\bin\b2 toolset=gcc-8~64 ^
address-model=64 --build-dir=%HOME%\build\boost ^
address-model=64 --build-dir=%USERPROFILE%\build\boost ^
--build-type=complete clean
Run-time Environment
--------------------
@ -226,15 +230,12 @@ configuration tool-chain file:
# ...
set (BOOSTDIR C:/Tools/boost)
set (QTDIR C:/Qt/5.12.9/mingw73_32)
# set (QTDIR C:/Qt/5.15.0/mingw81_32)
set (QTDIR C:/Qt/5.15.2/mingw81_32)
set (FFTWDIR C:/Tools/fftw-3.3.5-dll32)
set (HAMLIBDIR C:/test-install/hamlib/mingw32/debug)
set (LIBUSBDIR C:/Tools/libusb-1.0.23)
set (PYTHONDIR C:/Python27)
set (ASCIIDOCDIR C:/Tools/asciidoc-master)
# where to find required packages
set (CMAKE_PREFIX_PATH ${BOOSTDIR} ${QTDIR} ${FFTWDIR} ${HAMLIBDIR} ${HAMLIBDIR}/bin ${LIBUSBDIR} ${PYTHONDIR} ${ASCIIDOCDIR})
set (CMAKE_PREFIX_PATH ${BOOSTDIR} ${QTDIR} ${FFTWDIR} ${HAMLIBDIR} ${HAMLIBDIR}/bin ${LIBUSBDIR})
# ...