Have any one tried building Boost.Json static library?

437 Views Asked by At

I am trying to build boost json to get libboost_json.a . tried using --with-json option but it never generates .

my config says its building , but I do not see this lib getting generated , enter image description here

3

There are 3 best solutions below

0
On

when u use b2 to build the boost library, just append this option like: 'cxxstd=11' or maybe u build in cpp std 14, then use this option to instead: 'cxxstd=14'

./b2 cxxstd=11 install
2
On

As far as I no there may not be one.

Instead the idea is that you include boost/json/src.hpp in one of your own TUs. Of course, nothing stops you from putting that into your own static library, if that helps your build logistics.

0
On

If you have the Boost distribution and you build the libraries yourself, Boost.JSON should certainly get built. And binary distributions of Boost from specific packages should have a prebuilt Boost.JSON static and/or dynamic library.

Boost.JSON is available in Boost 1.75.0 and later.