15

I want to know how to create a tool executable, for example bcp, with the boost libraries. I have unzip the sources, but I do not know how to build to create the tool.

Thanks

Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794
david
  • 151
  • 2
  • 6
  • Boost is a series of libraries that you use in your C++ code. You use #include directives to add the necessary Boost headers to your .cpp files, and then use the Boost functionality you need in your application's code. You then compile that code with your C++ compiler to build an executable or DLL. Voting to close as "not a real question". – Ken White Jan 28 '11 at 17:17

2 Answers2

20

Complementing hkaiser answer:

Run ./bootstrap.sh from $BOOST_ROOT (refer to Getting Started for additional options)

./bootstrap.sh

This will generate the a ./bjam executable. You may then do

./bjam tools/bcp

Or even copy this executable to tools/bcp and do

./bjam 

The ./bcp executable will be in $BOOST_ROOT/dist/bin

kunigami
  • 3,046
  • 4
  • 26
  • 42
3

All tools in the directory $BOOST_ROOT/tools can be build by invoking bjam from the directory where the corresponding Jamfile[.v2] is located. For bcp this needs to be done in the directory $BOOST_ROOT/tools/bcp. If you have not built bjam yet, please refer to the Getting Started document explaining the necessary steps. The built executable by default will end up in $BOOST_ROOT/dist/bin.

hkaiser
  • 11,403
  • 1
  • 30
  • 35