Boost: How bjam constructs a library name?
Asked Answered
I

1

26

I was looking in the jam files, how the name of library is constructed. Example: libboost_log-mgw46-mt-1_48.dll

I would like to ignore the last part, how to pass linker the -o parameter with my constructed name. I have few versions and linking in a big project forces me to do changes in project file and that is a lot of places.

My wish is to get libboost_log.dll. I did just rename, but when executing a program it says, that it can not find libboost_log-mgw46-mt-1_48.dll file.

Intercession answered 20/1, 2012 at 10:53 Comment(0)
P
34

Boost Bjam has 3 different layouts of naming defined. To quote the help placed in Jamroot file (I'm not aware of any better online documentation):

#   --layout=<layout>       Determines whether to choose library names
#                           and header locations such that multiple
#                           versions of Boost or multiple compilers can
#                           be used on the same system.
#
#                               versioned - Names of boost binaries
#                               include the Boost version number, name and
#                               version of the compiler and encoded build
#                               properties.  Boost headers are installed in a
#                               subdirectory of <HDRDIR> whose name contains
#                               the Boost version number.
#
#                               tagged -- Names of boost binaries include the
#                               encoded build properties such as variant and
#                               threading, but do not including compiler name
#                               and version, or Boost version. This option is
#                               useful if you build several variants of Boost,
#                               using the same compiler.
#
#                               system - Binaries names do not include the
#                               Boost version number or the name and version
#                               number of the compiler.  Boost headers are
#                               installed directly into <HDRDIR>.  This option
#                               is intended for system integrators who are
#                               building distribution packages.
#
#                           The default value is 'versioned' on Windows, and
#                           'system' on Unix.

The system layout gives the naming scheme you want - plain basename without any other information.

Names for Boost output files according to these layouts are generated using the tag rule, defined in boostcpp.jam file.

Psychosomatic answered 3/3, 2012 at 22:53 Comment(1)
It bothers me that this is easier to find here on SO than it is to find in the boost documentation.Kuntz

© 2022 - 2024 — McMap. All rights reserved.