I'm trying to build Boost's example of an asynchronous TCP daytime server found on this link: http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/tutorial/tutdaytime3/src.html
Here what I am trying to build the example with:
g++ -o server server.cpp -I ~/boost/include -L~/boost/lib -lboost_system
Here are the errors I am getting:
g++ -o server server.cpp -I ~/boost/include -L~/boost/lib -lboost_system
/tmp/ccF38gvh.o: In function `__static_initialization_and_destruction_0(int, int)':
server.cpp:(.text+0x221): undefined reference to `boost::system::generic_category()'
server.cpp:(.text+0x22d): undefined reference to `boost::system::generic_category()'
server.cpp:(.text+0x239): undefined reference to `boost::system::system_category()'
/tmp/ccF38gvh.o: In function `boost::system::error_code::error_code()':
server.cpp:(.text._ZN5boost6system10error_codeC2Ev[_ZN5boost6system10error_codeC5Ev]+0x17): undefined reference to `boost::system::system_category()'
/tmp/ccF38gvh.o: In function `boost::asio::error::get_system_category()':
server.cpp:(.text._ZN5boost4asio5error19get_system_categoryEv[boost::asio::error::get_system_category()]+0x5): undefined reference to `boost::system::system_category()'
collect2: ld returned 1 exit status
make: *** [all] Error 1
What do I need to add to get this to successfully build?