1

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

Rajeev
  • 19
  • 1

2 Answers2

0

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.

sehe
  • 374,641
  • 47
  • 450
  • 633
  • Yes I didn't want to use header only version , due to a restriction that it must be defined in one and only one header file . My project has DTO objects and I want to put 'tag_invoke' for respective class file . When I use header only way , I throws exception while building . btw I was able to build the .a for json as commented here : https://github.com/conan-io/conan-center-index/issues/4040 – Rajeev Oct 12 '21 at 15:22
  • @Rajeev please post your find so it helps others. And be specific, so they don't have to read the whole issue like I just did. By the way, you realize that putting a single TU as static library is (a) strictly equivalent (b) possibly _SAFER_ in the light of ODR rules? That's because when you integrate into your build script there's a much smaller chance of compiler version/flag differences – sehe Oct 12 '21 at 17:24
0

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.

Vinnie Falco
  • 5,173
  • 28
  • 43