Sign in to follow this  
Mybowlcut

Using specific libraries of Boost

Recommended Posts

Mybowlcut    176
How can I use only certain Boost libraries in my project? I only want to use a few libraries and not use the rest, but am not sure if they have dependencies on each other. I've got Boost.Build set up, but am kinda unsure of what to do next...

Share this post


Link to post
Share on other sites
Mybowlcut    176
I just made a folder structure emulating the boost structure and included boost/filesystem.hpp. I kept on copying across the files it couldn't find (when building) into the new folder structure and it seems to be working besides not being able to find the libboost_filesystem-vc80-mt-gd-1_46_1.lib file. Is this a good way to use only certain parts of Boost? How do I use boost.build to build the filesystem libaries for example? I am reading Jamroot in the Boost root folder and it seems like --with-<library> would do it (as an argument when building with bjam)?

Share this post


Link to post
Share on other sites
yckx    1298
[quote name='Mybowlcut' timestamp='1306633311' post='4816958']
I just made a folder structure emulating the boost structure and included boost/filesystem.hpp. I kept on copying across the files it couldn't find (when building) into the new folder
[/quote]
Why couldn't you use the headers in the original boost directory? Just include the headers you need, and it shouldn't include the rest. And (IIRC) most of boost is just headers. Only a few of the libraries need to be built. If you don't need those libraries, you don't [i]have[/i] to build them ;)

Share this post


Link to post
Share on other sites
Mybowlcut    176
[quote name='yckx' timestamp='1306637290' post='4816971']
[quote name='Mybowlcut' timestamp='1306633311' post='4816958']
I just made a folder structure emulating the boost structure and included boost/filesystem.hpp. I kept on copying across the files it couldn't find (when building) into the new folder
[/quote]
Why couldn't you use the headers in the original boost directory? Just include the headers you need, and it shouldn't include the rest. And (IIRC) most of boost is just headers. Only a few of the libraries need to be built. If you don't need those libraries, you don't [i]have[/i] to build them ;)
[/quote]
Because this is for a project that is hosted on a repository, with many users. I only want to include the header files that are absolutely necessary, instead of the whole boost folder.

I'm using filesystem and date_time, which apparently require system as well.

Share this post


Link to post
Share on other sites
the_edd    2109
There's a tool for this, [url="http://live.boost.org/doc/libs/1_46_0/tools/bcp/doc/html/index.html"]BCP[/url]. I've never used it, so I don't know how well it works, though...

Share this post


Link to post
Share on other sites
Mybowlcut    176
[quote name='edd²' timestamp='1306673199' post='4817074']
There's a tool for this, [url="http://live.boost.org/doc/libs/1_46_0/tools/bcp/doc/html/index.html"]BCP[/url]. I've never used it, so I don't know how well it works, though...
[/quote]
Ah, that looks like a great tool. Thanks.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this