How to include boost::thread in your C++ project?

前端 未结 4 2037
长发绾君心
长发绾君心 2020-12-19 07:38

What do I need to do to include boost::thread in my project? I have copied the whole thread folder to my working path (I wish to be able to run this on several computers) a

4条回答
  •  生来不讨喜
    2020-12-19 08:33

    Unfortunately boost::thread is not a "header-only" library -- hence you need to have it compiled. There are basically two ways to go around it.

    1. you download a prebuilt install package from boostpro (assuming that you are on windows) -- https://sourceforge.net/projects/boost/files/boost-binaries/
    2. you can build it yourself - see http://www.boost.org/doc/libs/1_35_0/more/getting_started/index.html

提交回复
热议问题