A This Works
Http://jingyan.baidu.com/article/00a07f3843a33e82d028dcbf.html
I'm going to take a look at the boost library recently, and here's how to install the boost library. Method/Step
Download:
Download the source code first to boost's official web site.
To compile the VS2008 version of the Boost library:
First, compile the Bjam, run the BOOTSTRAP.BAT-VC9 at the command line, and then compile the library.
Compiling dynamic libraries: Bjam stage--toolset=msvc-9.0--without-graph--without-graph_parallel--without-math-- Without-python--without-serialization--without-wave--stagedir= "D:\Boost\bin\vc9" Link=static runtime-link=shared Threading=multi Debug Release
Compile static library: Bjam stage--toolset=msvc-9.0--without-graph--without-graph_parallel--without-math-- Without-python--without-serialization--without-wave--stagedir= "D:\Boost\bin\vc9" Link=static runtime-link=static Threading=multi Debug Release
The compilation took about 15 minutes, producing around 303MB of files
VS2008 Boost Library configuration:
Tools-> Options-> Projects and Solutions-> VC + + Directories in library files, add D:\Boost\bin\vc9\lib in include Fil ES, add D:\Boost\ where the library's directory is the location of the libraries that were previously compiled, including directories that vary with the different versions of Boost, and now version 1.47 is designated as D:\ Boost is a folder that uses SVN to download boost.
VS2008 Boost Library test:
#include "stdafx.h"
#include <iostream>
#include <boost/date_time/gregorian/gregorian.hpp>
using namespace Std;
using namespace boost;
int _tmain (int argc, _tchar* argv[])
{
cout<< "Please enter your birthday, format \" yyyy-mm-dd\ ":";
String Strbirthday;
cin>>strbirthday;
Try
{
Gregorian::d ate Birthday (gregorian::from_simple_string (strbirthday));
Gregorian::d ate today (Gregorian::d ay_clock::local_day ());
Gregorian::d ays days_alive = today-birthday;
if (Days_alive < gregorian::d ays (0))
{
cout<< "Wow, you can use a computer before you're born." <<endl;
}
Else
{
cout<< "You have appeared in this world:" << days_alive.days () << "Days" << Endl;
}
}
catch (gregorian::bad_year& e)
{
cerr<< e.what () << Endl;
}
catch (gregorian::bad_day_of_month& e)
{
cerr<< e.what () << Endl;
}
catch (gregorian::bad_day_of_year& e)
{
cerr<< e.what () << Endl;
}
catch (...)
{
cerr<< "error!" <<endl;
}
System ("pause");
return 0;
}