私は経験豊富なプログラマーではありません。ブーストの一部を切り取って、Visual Studio 2010 の C++ ソリューションであるプロジェクトに直接貼り付けようとしました。次のようにしました。
- ブースト ライブラリの解凍
bootstrap.batbjam tools/bcd- これにより、ディレクトリ.\bin.v2\tools\bcp\msvc-10.0\release\link-static\threading-multi\が作成されました- 上記のディレクトリに変更します
- ソリューション内のすべてのファイルをスキャンするためのスクリプトを作成しました。結果は次の
とおりです。 bcp --boost=C:\Users\xxxxxxxx\boost_1_49_0 noncopyable static_assert ratio thread/locks thread chrono interprocess/mapped_region thread/recursive_mutex crc cstdint interprocess/file_mapping make_shared shared_ptr lexical_cast lexical_cast ./myboost- ./myboostをソリューションにコピーし、プロパティを設定します。#include "boost/chrono.hpp" を実行しない限り、すべて正常に動作します (例: #include "boost/lexical_cast.hpp" で問題ありません)。
boost/chrono.hpp はリンカ エラーを引き起こします:
3>playerMain.obj: エラー LNK2001: 未解決の外部シンボル "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ)
3>playerMain.obj: エラー LNK2001: 未解決の外部シンボル "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAABVerror_category@12@XZ)
bcp を正しく使用していますか?
機能させるにはどうすればよいですか?