I'm not an experienced programmer. I tried to cut part of boost and paste it directly into my project which is a C++ solution in Visual Studio 2010. I've done it this way:
- uncompress boost library
bootstrap.bat
bjam tools/bcd
- this created dir .\bin.v2\tools\bcp\msvc-10.0\release\link-static\threading-multi\- change dir to mentioned above
- i've written a script for scanning all files in the solution, the result is:
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 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
- copy ./myboost into solution, set up properties, everything works fine until I'm not trying to #include "boost/chrono.hpp" (e.g. #include "boost/lexical_cast.hpp" is ok).
boost/chrono.hpp causes linker error:
3>playerMain.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::system_category(void)" (?system_category@system@boost@@YAABVerror_category@12@XZ)
3>playerMain.obj : error LNK2001: unresolved external symbol "class boost::system::error_category const & __cdecl boost::system::generic_category(void)" (?generic_category@system@boost@@YAABVerror_category@12@XZ)
Do I use bcp correctly?
What should I do to make it work?