-1

I have built the Boost library from these instructions:

http://stackoverflow.com/questions/3529163/install-boost-library-in-visual-c-2008

Directory of the unzipped Boost folder is C:\Users\David\Desktop\boost_1_44_0. I have called Visual C++ 2010. How to use Boost in a program?

I mean I want the following.

#include<boost>  
Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
  • Try this: http://pastebin.org/483007 for inspiration and precise your question if anything didn't work out. – jpalecek Aug 20 '10 at 11:54

2 Answers2

2

Tweak your project properties to add C:\Users\David\Desktop\boost_1_44_0 to the include path and maybe the link path if you plan to use the part of Boost that is not include-only (libboost_filesystem for instance).

Peter Mortensen
  • 30,738
  • 21
  • 105
  • 131
PW.
  • 3,727
  • 32
  • 35
  • i have created now project name of which is boost what to do? –  Aug 20 '10 at 12:04
  • 1
    Actually the include path should contain C:\Users\David\Desktop\boost_1_44_0\boost (the headers are in the "boost" directory inside the "boost_num_version" main directory usually (it was the case for all versions of boost I have worked with)). – ThR37 Aug 20 '10 at 12:05
0

You have to include the header path and library path in your project.

Also #include <boost> won't do anything. You have to include each individual feature of boost that you need. For instance if you need to link to the filesystem.lib file in to boost directory, and use #include "boost/filesystem.hpp".

Take a look at this answer from step 6: Another Answer

Community
  • 1
  • 1
Thomas Anagrius
  • 926
  • 5
  • 15
  • i am confused i did not understand well so i have boost library keept on desktop yes?i have built all boost library and i have visual c++ 2010 in which i i have created project name of which is boost what to do next and important how?steps i need please –  Aug 20 '10 at 12:21