7

I'm trying to use the Boost Copy (BCP) utility to pull the normal_distribution class out of Boost. However, when I do bcp normal_distribution ./my_normal_distribution_dir, nothing appears in the my_normal_distribution_dir directory.

Here's some more detailed background on the environment that I'm doing this in:

On Mac OS 10.7, I downloaded the Boost 1.50 and untared source files. In the top-level Boost directory, I did ./bootstrap.sh. Then, I did ./bjam ./tools/bcp, which produced a bcp executable in the ./dist/bin directory. I created a directory called my_normal_distribution_dir. Then, I tried the following commands to extract the normal_distribution class:

./dist/bin/bcp normal_distribution ./my_normal_distribution_dir
./dist/bin/bcp --list normal_distribution --boost=./ ./my_normal_distribution_dir 
./dist/bin/bcp --list normal_distribution --boost=./ output-path:./my_normal_distribution_dir

I also tried using the absolute path of my_normal_distribution_dir.

All of these give the following output:

no errors detected

However, after trying all this stuff, the my_normal_distribution_dir directory is still empty! What should I do?

Also, thanks to this thread for suggesting BCP. Once we solve the problem described above, BCP should handle my use case perfectly.

Community
  • 1
  • 1
solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112

3 Answers3

0

I never did resolve this. I ended up just manually yanking the files I needed from the Boost codebase. I'd love to learn how to do it the "right" way, though.

solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112
0

I guess you need something like

bcp --list math/distributions/normal.hpp

Documentation: http://www.boost.org/doc/libs/1_59_0/tools/bcp/doc/html/index.html#bcp.syntax.module

magras
  • 1,709
  • 21
  • 32
0

Old question, but in case anyone else runs across this, I had a similar problem here and I found that bcp was being picky about folders used in names. So while dist/bin/bcp boost/range/irange mydir and dist/bin/bcp irange mydir didn't work, dist/bin/bcp range/irange did. So I'm guessing in the case above,

./dist/bin/bcp random/normal_distribution ./my_normal_distribution_dir

might have worked.

aquirdturtle
  • 2,038
  • 26
  • 20