1。编译
设置环境变量(mingw的)
打开命令行到在boost根目录下,bootstrap mingw,生成bjam,bjam toolset=gcc 开始编译,在根目录下生成stage\lib
2。codeblocks 使用boost库
Settings->compiler->search directories->complier add f:\boost_1.53
->linker add f:\boost_1.53\stage\lib
3. test
#include <boost/lambda/lambda.hpp> #include <iostream> #include <iterator> #include <algorithm> int main() { using namespace boost::lambda; typedef std::istream_iterator<int> in; std::for_each( in(std::cin), in(), std::cout << (_1 * 3) << " " ); }
ok