boost install

C++ 擴充函式庫。

Source http://sourceforge.net/projects/boost/files/boost/1.46.1/


$ ./bootstrap.sh

$ ./bjam "-sTOOLS=gcc" "--includedir=/usr/include" "--libdir=/usr/lib/boost" install
#如果有需要可以另外再 with 幾個 component
#--with-filesystem --with-program_options --with-regex --with-serialization --with-system --with-thread 
$ g++ test.cpp -L/usr/lib/boost


//example
#include <boost/thread/thread.hpp>
#include <iostream>
void helloworld() {
std::cout << "Hello World!" << std::endl;
}
void main() {
boost::thread thrd(&helloworld);
thrd.join();
}

參考資源: