title: undefined reference to `boost::system::generic_category()' when adding boost/asio
body: <p>I want to use boost.asio header in my project, but when I include it's .hpp file I got this output error on compile:</p>
  
  <ul>
  <li><p>I need boost.asio for crow to route my web request.</p>
  
  <p>/home/john/Downloads/clion-1.2.4/bin/cmake/bin/cmake --build /home/john/.CLion12/system/cmake/generated/a3f08900/a3f08900/Release --target rcp -- -j 8
  [ 50%] Linking CXX executable /home/john/projects/rightChoiceProperty/bin/rcp
  CMakeFiles/rcp.dir/main.cpp.o: In function <code>_GLOBAL__sub_I_main':
  main.cpp:(.text.startup+0x53): undefined reference to</code>boost::system::generic_category()'
  main.cpp:(.text.startup+0x58): undefined reference to <code>boost::system::generic_category()'
  main.cpp:(.text.startup+0x5d): undefined reference to</code>boost::system::system_category()'
  main.cpp:(.text.startup+0x62): undefined reference to `boost::system::system_category()'
  collect2: error: ld returned 1 exit status
  CMakeFiles/rcp.dir/build.make:94: recipe for target '/home/john/projects/rightChoiceProperty/bin/rcp' failed
  make[3]: <strong>* [/home/john/projects/rightChoiceProperty/bin/rcp] Error 1
  CMakeFiles/Makefile2:67: recipe for target 'CMakeFiles/rcp.dir/all' failed
  make[2]: <em></strong> [CMakeFiles/rcp.dir/all] Error 2
  CMakeFiles/Makefile2:79: recipe for target 'CMakeFiles/rcp.dir/rule' failed
  make[1]: <strong></em> [CMakeFiles/rcp.dir/rule] Error 2
  Makefile:118: recipe for target 'rcp' failed
  make: *</strong> [rcp] Error 2</p></li>
  </ul>
  
  <p>I'm using CLion 1.2.4 as IDE
  this is my main.cpp content:</p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/asio.hpp&gt;
  
  using namespace std;
  
  int main() {
      cout &lt;&lt; "Hello, World!" &lt;&lt; endl;
      return 0;
  }
  </code></pre>
  
  <p>And this is my CMakeLists.txt file content:</p>
  
  <pre><code>cmake_minimum_required(VERSION 3.3)
  project(rcp)
  
  set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -lboost_system")
  
  set(SOURCE_FILES main.cpp)
  
  set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin")
  
  include_directories("libraries/boost")
  
  add_executable(rcp ${SOURCE_FILES})
  </code></pre>
  
  <p>Thank you so much</p>