Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Building a subset of boost libraries

Tags:

c++

boost

bjam

I'm trying to build only a subset of boost libraries. For example, I have this code:

test.cpp:

#include <boost/thread.hpp>

int main (){
    return 0;
}

I then do

./bcp --scan test.cpp ~/dev/boost_compact/

So the dependencies files are copied to ~/dev/boost_compact/boost.

Then, following this answer, I copy all files at the root of a regular boost and also the tools directory and run

./bootstrap
./bjam
./bjam install

This does copy all the headers to a destination directory, but it does not build/copy the libraries. This same set of actions does work in the full boost. What am I doing wrong?

like image 581
kunigami Avatar asked Aug 13 '11 13:08

kunigami


1 Answers

Solved the problem. The reason the libraries were not being copied was that I was using the wrong boost directory, that is

./bcp --scan --boost=<path to boost build directory> test.cpp ~/dev/boost_compact/

when I should be using

./bcp --scan --boost=<path to boost source directory> test.cpp ~/dev/boost_compact/

If now you run

./bootstrap
./bjam
./bjam install

The libraries will be build.

like image 141
kunigami Avatar answered Sep 21 '22 13:09

kunigami