Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I take a single element out of a boost library (e.g. shared_pointer)?

I've been playing around with some Boost components, and the only one I see a direct need for in the project I'm working on is boost::shared_ptr.

Would it be difficult to just include the required files for shared_ptr, or at least just include files for the Boost smart_ptr directory in my project? They seem to have some external dependencies on other parts of Boost - but I figure there's an easy way to just use certain components of the Boost library and I'm missing it.

If you can tell me what parts I need or point me to a good tutorial I'd be most grateful!

like image 916
John Humphreys Avatar asked Oct 07 '11 22:10

John Humphreys


1 Answers

You can use the bcp tool to extract only the header you want.

bcp shared_ptr /foo

This copies shared_ptr and all dependencies to the directory foo

like image 191
Praetorian Avatar answered Sep 20 '22 13:09

Praetorian