3

Boost 是一个优秀的库,但有时添加整个库并不方便。所以我想提取Boost的一小部分,只提取必要的文件。

我知道 BCP.exe,但它没有按预期工作。BCP.exe 提取了太多不必要的文件。

我使用 Visual C++ 2010,所以我不需要 Mac 或 Linux 文件。仅支持 Visual C++ 编译器即可。

任何人都可以帮助我吗?例如,我只想使用 Boost::any,但是 bcp 提取以下文件列表:

\boost\any.hpp
\boost\config
\boost\config.hpp
\boost\current_function.hpp
\boost\detail
\boost\exception
\boost\mpl
\boost\non_type.hpp
\boost\preprocessor
\boost\static_assert.hpp
\boost\throw_exception.hpp
\boost\type.hpp
\boost\type_traits
\boost\version.hpp
\boost\config\abi
\boost\config\abi_prefix.hpp
\boost\config\abi_suffix.hpp
\boost\config\auto_link.hpp
\boost\config\compiler
\boost\config\no_tr1
\boost\config\platform
\boost\config\posix_features.hpp
\boost\config\requires_threads.hpp
\boost\config\select_compiler_config.hpp
\boost\config\select_platform_config.hpp
\boost\config\select_stdlib_config.hpp
\boost\config\stdlib
\boost\config\suffix.hpp
\boost\config\user.hpp
\boost\config\warning_disable.hpp
\boost\config\abi\borland_prefix.hpp
\boost\config\abi\borland_suffix.hpp
\boost\config\abi\msvc_prefix.hpp
\boost\config\abi\msvc_suffix.hpp
\boost\config\compiler\borland.hpp
\boost\config\compiler\clang.hpp
\boost\config\compiler\codegear.hpp
\boost\config\compiler\comeau.hpp
\boost\config\compiler\common_edg.hpp
\boost\config\compiler\compaq_cxx.hpp
\boost\config\compiler\cray.hpp
\boost\config\compiler\digitalmars.hpp
\boost\config\compiler\gcc.hpp
\boost\config\compiler\gcc_xml.hpp
\boost\config\compiler\greenhills.hpp
\boost\config\compiler\hp_acc.hpp
\boost\config\compiler\intel.hpp
\boost\config\compiler\kai.hpp
\boost\config\compiler\metrowerks.hpp
\boost\config\compiler\mpw.hpp
\boost\config\compiler\nvcc.hpp
\boost\config\compiler\pathscale.hpp
\boost\config\compiler\pgi.hpp
\boost\config\compiler\sgi_mipspro.hpp
\boost\config\compiler\sunpro_cc.hpp
\boost\config\compiler\vacpp.hpp
\boost\config\compiler\visualc.hpp
\boost\config\no_tr1\cmath.hpp
\boost\config\no_tr1\complex.hpp
\boost\config\no_tr1\functional.hpp
\boost\config\no_tr1\memory.hpp
\boost\config\no_tr1\utility.hpp
\boost\config\platform\aix.hpp
\boost\config\platform\amigaos.hpp
\boost\config\platform\beos.hpp
\boost\config\platform\bsd.hpp
\boost\config\platform\cray.hpp
\boost\config\platform\cygwin.hpp
\boost\config\platform\hpux.hpp
\boost\config\platform\irix.hpp
\boost\config\platform\linux.hpp
\boost\config\platform\macos.hpp
\boost\config\platform\qnxnto.hpp
\boost\config\platform\solaris.hpp
\boost\config\platform\symbian.hpp
\boost\config\platform\vms.hpp
\boost\config\platform\vxworks.hpp
\boost\config\platform\win32.hpp
\boost\config\stdlib\dinkumware.hpp
\boost\config\stdlib\libcomo.hpp
\boost\config\stdlib\libcpp.hpp
\boost\config\stdlib\libstdcpp3.hpp
\boost\config\stdlib\modena.hpp
\boost\config\stdlib\msl.hpp
\boost\config\stdlib\roguewave.hpp
\boost\config\stdlib\sgi.hpp
\boost\config\stdlib\stlport.hpp
\boost\config\stdlib\vacpp.hpp
\boost\detail\workaround.hpp
\boost\exception\detail
\boost\exception\exception.hpp
\boost\exception\detail\attribute_noreturn.hpp
\boost\mpl\aux_
\boost\mpl\bool.hpp
\boost\mpl\bool_fwd.hpp
\boost\mpl\int.hpp
\boost\mpl\integral_c.hpp
\boost\mpl\integral_c_fwd.hpp
\boost\mpl\integral_c_tag.hpp
\boost\mpl\int_fwd.hpp
\boost\mpl\aux_\adl_barrier.hpp
\boost\mpl\aux_\config
\boost\mpl\aux_\integral_wrapper.hpp
\boost\mpl\aux_\lambda_support.hpp
\boost\mpl\aux_\na_fwd.hpp
\boost\mpl\aux_\nttp_decl.hpp
\boost\mpl\aux_\preprocessor
\boost\mpl\aux_\static_cast.hpp
\boost\mpl\aux_\template_arity_fwd.hpp
\boost\mpl\aux_\yes_no.hpp
\boost\mpl\aux_\config\adl.hpp
\boost\mpl\aux_\config\arrays.hpp
\boost\mpl\aux_\config\ctps.hpp
\boost\mpl\aux_\config\gcc.hpp
\boost\mpl\aux_\config\intel.hpp
\boost\mpl\aux_\config\lambda.hpp
\boost\mpl\aux_\config\msvc.hpp
\boost\mpl\aux_\config\nttp.hpp
\boost\mpl\aux_\config\overload_resolution.hpp
\boost\mpl\aux_\config\preprocessor.hpp
\boost\mpl\aux_\config\static_constant.hpp
\boost\mpl\aux_\config\ttp.hpp
\boost\mpl\aux_\config\workaround.hpp
\boost\mpl\aux_\preprocessor\enum.hpp
\boost\mpl\aux_\preprocessor\params.hpp
\boost\preprocessor\arithmetic
\boost\preprocessor\cat.hpp
\boost\preprocessor\comma_if.hpp
\boost\preprocessor\config
\boost\preprocessor\control
\boost\preprocessor\debug
\boost\preprocessor\detail
\boost\preprocessor\facilities
\boost\preprocessor\inc.hpp
\boost\preprocessor\list
\boost\preprocessor\logical
\boost\preprocessor\punctuation
\boost\preprocessor\repeat.hpp
\boost\preprocessor\repetition
\boost\preprocessor\tuple
\boost\preprocessor\variadic
\boost\preprocessor\arithmetic\inc.hpp
\boost\preprocessor\config\config.hpp
\boost\preprocessor\control\expr_iif.hpp
\boost\preprocessor\control\if.hpp
\boost\preprocessor\control\iif.hpp
\boost\preprocessor\debug\error.hpp
\boost\preprocessor\detail\auto_rec.hpp
\boost\preprocessor\detail\check.hpp
\boost\preprocessor\detail\dmc
\boost\preprocessor\detail\is_binary.hpp
\boost\preprocessor\detail\dmc\auto_rec.hpp
\boost\preprocessor\facilities\empty.hpp
\boost\preprocessor\facilities\overload.hpp
\boost\preprocessor\list\adt.hpp
\boost\preprocessor\list\for_each_i.hpp
\boost\preprocessor\logical\bool.hpp
\boost\preprocessor\logical\compl.hpp
\boost\preprocessor\punctuation\comma.hpp
\boost\preprocessor\punctuation\comma_if.hpp
\boost\preprocessor\repetition\detail
\boost\preprocessor\repetition\for.hpp
\boost\preprocessor\repetition\repeat.hpp
\boost\preprocessor\repetition\detail\dmc
\boost\preprocessor\repetition\detail\edg
\boost\preprocessor\repetition\detail\for.hpp
\boost\preprocessor\repetition\detail\msvc
\boost\preprocessor\repetition\detail\dmc\for.hpp
\boost\preprocessor\repetition\detail\edg\for.hpp
\boost\preprocessor\repetition\detail\msvc\for.hpp
\boost\preprocessor\tuple\eat.hpp
\boost\preprocessor\tuple\elem.hpp
\boost\preprocessor\tuple\rem.hpp
\boost\preprocessor\tuple\to_list.hpp
\boost\preprocessor\variadic\elem.hpp
\boost\preprocessor\variadic\size.hpp
\boost\type_traits\broken_compiler_spec.hpp
\boost\type_traits\config.hpp
\boost\type_traits\detail
\boost\type_traits\ice.hpp
\boost\type_traits\integral_constant.hpp
\boost\type_traits\is_lvalue_reference.hpp
\boost\type_traits\is_reference.hpp
\boost\type_traits\is_rvalue_reference.hpp
\boost\type_traits\msvc
\boost\type_traits\remove_reference.hpp
\boost\type_traits\detail\bool_trait_def.hpp
\boost\type_traits\detail\bool_trait_undef.hpp
\boost\type_traits\detail\ice_and.hpp
\boost\type_traits\detail\ice_eq.hpp
\boost\type_traits\detail\ice_not.hpp
\boost\type_traits\detail\ice_or.hpp
\boost\type_traits\detail\template_arity_spec.hpp
\boost\type_traits\detail\type_trait_def.hpp
\boost\type_traits\detail\type_trait_undef.hpp
\boost\type_traits\detail\wrap.hpp
\boost\type_traits\detail\yes_no_type.hpp
\boost\type_traits\msvc\remove_reference.hpp
\boost\type_traits\msvc\typeof.hpp
4

1 回答 1

5

BCP 运行正常,如果您检查“任何”库的包含层次结构,您会发现上面列出的文件。好像有点过分了。

另一种(但速度慢得多)的方法是创建一个空的包含目录并添加您需要的最小头文件集。然后只需跟踪编译器错误并添加编译器抱怨丢失的每个头文件。我在 C++ Boost 项目中使用这种方法取得了一些成功。

于 2013-02-03T11:21:03.227 回答