$ g++ -I ./boost_1_51_0 my-boost-hpp-example.cpp
$ ls
a.out boost_1_51_0 my-boost-example.cpp
$ ldd a.out
linux-vdso.so.1 => (0x00007fff3a1de000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007f9bc18e1000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f9bc16cb000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f9bc1301000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007f9bc0ff8000)
/lib64/ld-linux-x86-64.so.2 (0x00007f9bc1c63000)
### This demo is hpp included, no lib link needed
$ file a.out
a.out: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/l, for GNU/Linux 2.6.32, BuildID[sha1]=8ca61657a3fa8fc58409761b1be18eec1a0e04f8, not stripped
## Try to build 32 bit
$ g++ -I ./boost_1_51_0 -m32 my-boost-example.cpp
$ ./a.out
1
3 2
6 2
6
$ echo 1 2 3 |./a.out
3 6 9
$ file a.out
a.out: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked, interpreter /lib/ld-, for GNU/Linux 2.6.32, BuildID[sha1]=61b3959a3816dff4ae3cd3ae9b4fdfe855478bb7, not stripped
jhula@ShSwDev2:~/local/JCI-Native-Components/third-party$ ./a.out
122
366 3
9
$ ldd ./a.out
linux-gate.so.1 => (0xf77c4000)
libstdc++.so.6 => /usr/lib32/libstdc++.so.6 (0xf7625000)
libgcc_s.so.1 => /lib/i386-linux-gnu/libgcc_s.so.1 (0xf7608000)
libc.so.6 => /lib/i386-linux-gnu/libc.so.6 (0xf7452000)
libm.so.6 => /lib/i386-linux-gnu/libm.so.6 (0xf73fd000)
/lib/ld-linux.so.2 (0xf77c5000)
$
/*
*
* g++ -I ./boost_1_51_0 my-boost-hpp-example.cpp
*
* */
#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) << " " );
}