building_utf.qbk 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. [/
  2. / Copyright (c) 2003 Boost.Test contributors
  3. /
  4. / Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. / file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. /]
  7. [section:build_utf Building the __UTF__]
  8. In case you would like to use the [link boost_test.usage_variants.shared_lib shared library variant] or the [link boost_test.usage_variants.static_lib static library variant] of the __UTF__, the library needs to be built.
  9. Building the __UTF__ is in fact quite easy.
  10. In the sequel, we define
  11. * $`boost_path` refers to the location where the boost archive was deflated
  12. * $`boost_installation_prefix` refers to the location where you want to install the __UTF__
  13. [/ not true
  14. [note By default, the static and dynamic variant will be built for your operating system]
  15. ]
  16. More documentation about *Boost's build system* can be found [@http://www.boost.org/more/getting_started/index.html here].
  17. [h3 Windows]
  18. You need to have a compilation toolchain. /Visual Studio Express/ is such one, freely available from the
  19. Microsoft website. Once installed, open a /Visual Studio Command Line tools/ prompt and build the Boost build program `b2`
  20. (see the link above). You will then be able to compile the __UTF__ with different variants.
  21. [h4 Static variant]
  22. For building 32bits libraries, open a console window and enter the following commands:
  23. ```
  24. > cd ``$``boost_path
  25. > bootstrap.bat
  26. > b2 address-model=32 architecture=x86 --with-test link=static \
  27. > --prefix=``$``boost_installation_prefix install
  28. ```
  29. For building 64bits libraries, the commands become:
  30. ```
  31. > cd ``$``boost_path
  32. > bootstrap.bat
  33. > b2 address-model=64 architecture=x86 --with-test link=static \
  34. > --prefix=``$``boost_installation_prefix install
  35. ```
  36. [h4 Shared library variant]
  37. In order to build the shared library variant, the directive `link=static` should be replaced by `link=shared` on the above command lines.
  38. For instance, for 64bits builds, the commands become:
  39. ```
  40. > cd ``$``boost_path
  41. > bootstrap.bat
  42. > b2 address-model=64 architecture=x86 --with-test link=shared --prefix=``$``boost_installation_prefix install
  43. ```
  44. [h3 Linux/OSX]
  45. For Unix/Linux/OSX operating system, the build of the __UTF__ is very similar to the one on Windows:
  46. ```
  47. > cd ``$``boost_path
  48. > ./bootstrap.sh
  49. > ./b2 --with-test --prefix=``$``boost_installation_prefix install
  50. ```
  51. [endsect] [/build_utf]