Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Getting only necessary headers out of boost

Tags:

c++

boost

I need to submit an assignment, but I only want to include the header files from boost that I actually used (I made use of boost::shared_ptr and boost::function). I tried doing so manually, but I'm missing some header files and everytime i go to add them, it turns out I'm missing more. Is there a quick easy way to find out exactly what headers I actually need?

Thanks

like image 561
Megatron Avatar asked Mar 15 '11 02:03

Megatron


2 Answers

The bcp command is made for this:

NAME

   bcp - extract subsets of Boost

SYNOPSIS

   bcp --list [options] module-list
   bcp [options] module-list output-path
   bcp --report [options] module-list html-file
   bcp --help

DESCRIPTION

   Copies all the files, including dependencies, found in module-list to
   output-path. output-path must be an existing path.

But you will probably be surprised to see just how interdependent these Boost headers are.

like image 181
Dirk Eddelbuettel Avatar answered Sep 24 '22 06:09

Dirk Eddelbuettel


There is a tool called bcp to do exactly that -- copy out the parts of Boost you need and no more.

like image 28
Jeremiah Willcock Avatar answered Sep 21 '22 06:09

Jeremiah Willcock