0

In Visual Studio 2017, I'm able to build and run C++ project that includes Boost v1.69.0 as pre-build binaries for VS. However, now I want to distribute release copy of my project that includes all the necessary .dll &.lib files. How to make sure that all Boost .dll&.lib files are included with final release ?
Below is the list of Boost libraries being used in my project:

#include <boost/log/core.hpp>
#include <boost/log/trivial.hpp>
#include <boost/log/expressions.hpp>
#include <boost/log/sinks/text_file_backend.hpp>
#include <boost/log/utility/setup/file.hpp>
#include <boost/log/utility/setup/common_attributes.hpp>
#include <boost/log/sources/severity_logger.hpp>
#include <boost/log/sources/record_ostream.hpp>
genpfault
  • 51,148
  • 11
  • 85
  • 139
newprint
  • 6,936
  • 13
  • 67
  • 109
  • 3
    Most open-source projects lists their dependencies in their documentation, but don't distribute them. It's up to the users of the project to make sure the necessary dependencies are installed. In fact it can be hard to distribute binary files like static libraries, since the users of your project might use a different compiler with a different ABI than the one the libraries were made with. – Some programmer dude Jul 11 '19 at 13:28
  • 2
    I agree. You should not be distributing a subset of the `boost` libs that your code uses. Just list `boost`as a requirement for your code like most other open source projects do. – drescherjm Jul 11 '19 at 13:30
  • @Someprogrammerdude Project will be distributed internally and will be used on our production servers. It will not be distributed as open source project. – newprint Jul 11 '19 at 14:12
  • 1
    That's somewhat another matter, you could still release it as an open-source project but only internally. Otherwise, how do you build the project? How do you list the libraries you should link with? Are you linking statically or using DLL's? – Some programmer dude Jul 11 '19 at 14:25
  • @Someprogrammerdude Release is in .MSI file that organization members can use. It should be trouble free for the end user who will install the software, i.e self contained. In VS studio, in project properties, VC++ Directories > Include directories > points to the root directory, where Boost is installed (C:\Local\Boost1.60.0\x32\). And Linker>General>Additional libraries> C:\Local\Boost1.60.0\x32\lib32-msvc-14.1\ - where `.dll`&`.lib` files are located. – newprint Jul 11 '19 at 14:40

1 Answers1

1

There is BOOST utility - BCP I think this utility may be useful for decision of your problem.

below is a quote from the manual:

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.

Community
  • 1
  • 1
SergV
  • 1,269
  • 8
  • 20