I'm quite new to using boost and I can't seem to find documentation anywhere on how to distribute your application when using boost?
Many of the libraries are shared libraries, I'm not expecting my users to have boost installed, I'm only using a single library (regex) so is there an easy way to package the regex library with my application without compiling with the static version?
Boost is a set of libraries for the C++ programming language that provides support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. It contains 164 individual libraries (as of version 1.76).
After 20 years of active Boost development, it's now recognized as a very powerful C++ library, for each major version many C++ libraries from the community were added. The Boost reviewers have an advanced C++ skills and their contributions guarantee a high quality for many years.
To participate in development, you need to subscribe to the Boost developers' list. Once you've done that, some paths to contribution are: Submit patches for new features or bug fixes. Pick any ticket from our bug tracking system on GitHub and get started.
boost and the C++ standard libraries are used to produce extremely fast production implementations.
For binary distribution, I recommend using the distribution's package management, which should take care of any dependencies. Some commercial apps just use binary blobs and you need to install a version of boost by yourself.
Finding libraries is a bit more difficult on linux. It does not automatically load shared objects from the current directory if they are linked at compile time (as opposed to loading at runtime with dlopen).
You have to use the LD_LIBRARY_PATH env variable or use rpath. Both has it's drawbacks.
There is no way around including the dlls. The usual approach is to put everything into a directory and zip it up.
To build from source you need the boost sources anyway, so no need to include libraries.
Most libraries in boost are header only anyway, regexp is not one of them. It should be sufficient to include dlls for this module. In Linux you can check against which shared libs your binary is compiled by using:
ldd binary
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With