Boost BCP doesn't output any files?

2019-06-23 07:45发布

问题:

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.

回答1:

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.



回答2:

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