3

Boost は優れたライブラリですが、ライブラリ全体を追加するのは不便な場合があります。そこで、Boost の一部を抽出したいのですが、必要なファイルだけを抽出します。

BCP.exe は知っていますが、期待どおりに動作しませんでした。BCP.exe は不要なファイルを抽出しすぎます。

私は Visual C++ 2010 を使用しているので、Mac や Linux のファイルは必要ありません。Visual C++ コンパイラのサポートのみ OK です。

誰でも私を助けることができますか?たとえば、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 は正常に機能しています。「any」ライブラリの包含階層を調べると、上記のファイルが見つかります。少し過剰に思えます。

別の (ただし、はるかに遅い) 方法は、空のインクルード ディレクトリを作成し、必要な最小限のヘッダー ファイル セットを追加することです。次に、コンパイラ エラーを追跡し、コンパイラが欠落していると訴える各ヘッダーを追加します。私は C++ Boost プロジェクトでこのアプローチである程度の成功を収めました。

于 2013-02-03T11:21:03.227 に答える