views:

150

answers:

1

I have downloaded Visual C++ 2008 and I also have the Boost library, v. 1.44.0. How to can the Boost library be installed in C++?

I also have Visual C++ 2010.

+1  A: 

You don't have to "install" Boost in Visual Studio. What you need is to point your IDE (in this case Visual Studio) to the folders which contain the Boost headers and the lib files (if you have built Boost - some Boost libraries are header-only, some need to be built). Take a look at Boost Getting Started for further details.

Quick start:

  • start your command prompt and go to the folder in which you have unzipped boost
  • execute bootstrap.bat
  • execute ".\bjam --build-type=complete stage" - this will build almost everything in Boost.

Note: make sure you have the VC++ compiler and linker in the environment variable PATH.

celavek
and i can use boost in visual studio 2010 yes?or
@c-programmer you can use it in whatever IDE you wish; it has nothing to do with the IDE, e.g. you can use it in your app and build you app from command line; as long as you include the proper headers and instruct your compiler/linker where to look for the headers/libraries then you'll be fine
celavek
@Marius thanks very much just one question maybe in one week there will be new version of boost 1.45 and i should update it from IDE or how do?
@c-programmer just change the paths in the IDE pointing to boost headers/lib to point to the folders where you have boost version > 1.44.0; or you could keep the same folder structure for boost and just overwrite the sources/headers and rebuild the libraries
celavek
so please finally i have question i have build boost library and call visual c++ 2010 i should include boost like this#include <boost> or?can you show me i little example?also how much time takes boost to build i have run it and it 1 hour already it is running
@c-programmer if you build everything it takes some time(depending also on your machine etc.). boost is a collection of libraries, I suggest you follow this link http://www.boost.org/doc/libs/1_44_0/libs/libraries.htm, decide which library you need and then follow its documentation(each library has extensive doc with tutorials and examples).
celavek
can i stop it and continue next time?
I think the question is HOW to change the paths in your IDE, which you never answered, celavek.
Domenic