6
votes

So I am trying for whole day to integrate Boost with Visual Studio (2008) on Windows 7. I firstly I went twice trough this How to use Boost in Visual Studio 2010.

I searched over all (there are at least 3 of them) simiral topics and none of them worked.

Some people proposed using this one : www.boostpro.com/download/ but link is not active. Someone proposed to change runtime library to Multi-threaded DLL but is also didnt work.

I just try to include #include <boost/thread.hpp> and got this error

fatal error LNK1104: cannot open file 'libboost_thread-vc90-mt-s-1_53.lib'.

Before installing Boost the error was that it cannot find the thread.hpp so it seems like the Boost is installed somewhat correctly.

The problem is that the libraries were not build while I was using the tutorial. How can I build them manually?

4

4 Answers

3
votes

There's no such thing like one-click boost install, you still need to do something manually. In your case it seems you need to compile Boost.Thread library and then add directory where resulting .lib file is to your library path. The link you provided looks pretty good. If you followed it probably you already built Boost.Thread. Make sure you did #6 from the second part.

1
votes

Use this command: bjam --build-dir=build-directory toolset=toolset-name --build-type=complete stage this build the libraries manually. Then add the new directory to additional libraries path

as it is indicated in this link: http://www.boost.org/doc/libs/1_43_0/more/getting_started/windows.html#or-build-binaries-from-source

1
votes

I found this article quite helpful:

http://www.codeproject.com/Articles/11597/Building-Boost-libraries-for-Visual-Studio

  • The article explains how to build the build tool BJam (mainly by locating the boostrapper.bat)
  • How to build the libraries, e.g. bjam toolset=msvc-11.0 variant=debug threading=multi link=static (in this case the VS2012 multi-threaded, statically linked debug version).
  • It also features build batches, but I haven't tried them.
  • It has some additional information on how to specifiy the used C-Runtime