What is a phased library?

While trying to create a thrift C ++ library, I found the following error after specifying the --with-boost option.

If you have a phased acceleration library (still not installed), please specify $ BOOST_ROOT in your environment and do not give PATH --with-boost.

I looked at the documentation on acceleration (which I am not too familiar with), but I did not find a good definition for the term staged boost library . I see a bracket (still not installed) , but there are many states that can be in this folder under the not installed category.

When I load boost first, I run ./bootstrap and ./b2 to compile it.

Is it staged at this point? Or do I need to do something else to make it staged ?

+5
source share
2 answers

You may call

 b2 --help 

to view the Boost.Build options, and there you can find

 install Install headers and compiled library files to the ======= configured locations (below). ... stage Build and install only compiled library files to the ===== stage directory. 

The stage or install declaration indicates whether Boost libraries are installed in a subfolder named stage or system-wide. The value of the entire system depends on the operating system. On Windows, the target directory is c:\boost ; on Linux, /usr/local . The destination directory can also be explicitly specified using the -โ€“prefix option. Also see this answer , I think it will be useful.

See the Getting Started Guide for Windows or Linux for more information.

+4
source

When you run .\b2 to compile Boost, it creates a folder called stage, and the compilation output is placed inside the% BOOST_ROOT% \ stage \ lib folder. Now you can copy this lib folder somewhere and add it to the linker path. However, some projects may expect binaries to be available on stage \ lib. So, โ€œdeliveredโ€ here means that you have libraries compiled and presented in the stage \ lib folder. The .b2 command takes several different parameters for compiling different child binaries, for example, below compiling binaries that are related to the common runtime and x64 architecture:

  b2 variant=debug,release link=shared runtime-link=shared address-model=64 

Each variant of the lib file name has tags, so they do not overwrite each other, for example, libboost_date_time-vc140-mt-gd-1_62.lib .

+2
source

All Articles