0

I need to use a cross-platform library to control child processes. The only mature recommended library I found is boost::process, but I'm new to Boost.

I'd like to use this library only, but I'm unsure about how I could do it and if there are other dependencies, i.e., do I also need to compile another library or is it headers only? My end goal is to use as little as possible from Boost. How should I go about it?

gstukelj
  • 2,291
  • 1
  • 7
  • 20
user63898
  • 29,839
  • 85
  • 272
  • 514

3 Answers3

3

Have you had a look into the BCP utility? From the Overview section:

The bcp utility is a tool for extracting subsets of Boost, it's useful for Boost authors who want to distribute their library separately from Boost, and for Boost users who want to distribute a subset of Boost with their application.

bcp can also report on which parts of Boost your code is dependent on, and what licences are used by those dependencies.

gstukelj
  • 2,291
  • 1
  • 7
  • 20
1

Boost Process is header-only, so you don't have to compile it separately. I checked some source files and they seem to use some other Boost headers, so you should download the entire thing.

If you want that your customers don't have to download Boost, you can check which files are needed and distribute those with your library.

VLL
  • 9,634
  • 1
  • 29
  • 54
1

or it is headers only?

You can find that out by reading the list of Boost libraries that are not header only i.e. that require separate compilation in the linked documentation. Boost.Process is not in the list of libraries needing separate compilation, and therefore it is header only.

Using boost process without downloading all the boost framework can it be done?

Not very practically. In theory, you need only the headers for header only libraries, but checking out only a directory is a bit tricky.

i can't find how and if i need to compile another library it depended on

As per the linked documentation, you don't need to.

eerorika
  • 232,697
  • 12
  • 197
  • 326