Compiling issues with boost
I'm having problems with compiling a program which includes "boost/asio.hpp". Compiling this program(taken from boost site): 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) << " " ); } with c++ -I path/to/boost_1_55_0 example.cpp -o example works fine. But when the program includes: boost/asio.hpp And I'm trying to compile it with: g++ -I /usr/local/boost_1_55_0 example.cpp -o example -lboost