title: cannot compile boost::fiber official examples
body: <p>I am trying out boost::fiber library, but I couldn't manage to compile code with boost fiber. Therefore I turned into compiling and running boost official examples. I installed latest version of boost library 1.65.1, and installation seems to be fine. I executed following command to compile simple.cpp  </p>
  
  <pre><code>g++ -I /usr/local/include/boost/ -L /usr/local/lib/ -lboost_fiber -std=c++11 libs/fiber/examples/simple.cpp    
  </code></pre>
  
  <p>But I get the following complains:</p>
  
  <pre><code>/tmp/ccWQ5ZMf.o: In function `main':
  simple.cpp:(.text+0x7b): undefined reference to `boost::fibers::fiber::join()'
  /tmp/ccWQ5ZMf.o: In function `boost::context::continuation::~continuation()':
  simple.cpp:(.text._ZN5boost7context12continuationD2Ev[_ZN5boost7context12continuationD5Ev]+0x59): undefined reference to `ontop_fcontext'
  /tmp/ccWQ5ZMf.o: In function `boost::context::continuation::resume()':
  simple.cpp:(.text._ZN5boost7context12continuation6resumeEv[_ZN5boost7context12continuation6resumeEv]+0x68): undefined reference to `jump_fcontext'
  /tmp/ccWQ5ZMf.o: In function `boost::fibers::context::context(unsigned long, boost::fibers::type, boost::fibers::launch)':
  simple.cpp:(.text._ZN5boost6fibers7contextC2EmNS0_4typeENS0_6launchE[_ZN5boost6fibers7contextC5EmNS0_4typeENS0_6launchE]+0x18): undefined reference to `vtable for boost::fibers::context'
  /tmp/ccWQ5ZMf.o: In function `boost::fibers::fiber::get_id() const':
  simple.cpp:(.text._ZNK5boost6fibers5fiber6get_idEv[_ZNK5boost6fibers5fiber6get_idEv]+0x3b): undefined reference to `boost::fibers::context::get_id() const'
  /tmp/ccWQ5ZMf.o: In function `boost::this_fiber::yield()':
  simple.cpp:(.text._ZN5boost10this_fiber5yieldEv[_ZN5boost10this_fiber5yieldEv]+0x5): undefined reference to `boost::fibers::context::active()'
  simple.cpp:(.text._ZN5boost10this_fiber5yieldEv[_ZN5boost10this_fiber5yieldEv]+0xd): undefined reference to `boost::fibers::context::yield()'
  /tmp/ccWQ5ZMf.o: In function `boost::fibers::fiber::fiber&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int, void, void, void&gt;(void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int)':
  simple.cpp:(.text._ZN5boost6fibers5fiberC2IRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEvvvEEOT_DpT0_[_ZN5boost6fibers5fiberC5IRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEvvvEEOT_DpT0_]+0x2c): undefined reference to `boost::context::stack_traits::default_size()'
  /tmp/ccWQ5ZMf.o: In function `boost::fibers::fiber::fiber&lt;boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt;, void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;(boost::fibers::launch, std::allocator_arg_t, boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt;, void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int)':
  simple.cpp:(.text._ZN5boost6fibers5fiberC2INS_7context21basic_fixedsize_stackINS3_12stack_traitsEEERFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEENS0_6launchESt15allocator_arg_tT_OT0_DpT1_[_ZN5boost6fibers5fiberC5INS_7context21basic_fixedsize_stackINS3_12stack_traitsEEERFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEENS0_6launchESt15allocator_arg_tT_OT0_DpT1_]+0x7f): undefined reference to `boost::fibers::fiber::start_()'
  /tmp/ccWQ5ZMf.o: In function `boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;::worker_context&lt;boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt; &gt;(boost::fibers::launch, boost::context::preallocated const&amp;, boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt; const&amp;, void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int)':
  simple.cpp:(.text._ZN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEC2INS_7context21basic_fixedsize_stackINSG_12stack_traitsEEEEENS0_6launchERKNSG_12preallocatedERKT_SB_SD_i[_ZN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEC5INS_7context21basic_fixedsize_stackINSG_12stack_traitsEEEEENS0_6launchERKNSG_12preallocatedERKT_SB_SD_i]+0x15d): undefined reference to `boost::fibers::context::~context()'
  /tmp/ccWQ5ZMf.o: In function `boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;::run_(boost::context::continuation&amp;&amp;)':
  simple.cpp:(.text._ZN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEE4run_EONS_7context12continuationE[_ZN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEE4run_EONS_7context12continuationE]+0xb5): undefined reference to `boost::fibers::context::terminate()'
  /tmp/ccWQ5ZMf.o: In function `void* boost::context::detail::create_context2&lt;boost::context::detail::record&lt;boost::context::continuation, boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt;, std::_Bind&lt;std::_Mem_fn&lt;boost::context::continuation (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;::*)(boost::context::continuation&amp;&amp;)&gt; (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;*, std::_Placeholder&lt;1&gt;)&gt; &gt;, boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt;, std::_Bind&lt;std::_Mem_fn&lt;boost::context::continuation (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;::*)(boost::context::continuation&amp;&amp;)&gt; (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;*, std::_Placeholder&lt;1&gt;)&gt; &gt;(boost::context::preallocated, boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt;, std::_Bind&lt;std::_Mem_fn&lt;boost::context::continuation (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;::*)(boost::context::continuation&amp;&amp;)&gt; (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;*, std::_Placeholder&lt;1&gt;)&gt;&amp;&amp;)':
  simple.cpp:(.text._ZN5boost7context6detail15create_context2INS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEES7_SX_EEPvNS0_12preallocatedET0_OT1_[_ZN5boost7context6detail15create_context2INS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEES7_SX_EEPvNS0_12preallocatedET0_OT1_]+0xd8): undefined reference to `make_fcontext'
  simple.cpp:(.text._ZN5boost7context6detail15create_context2INS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEES7_SX_EEPvNS0_12preallocatedET0_OT1_[_ZN5boost7context6detail15create_context2INS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEES7_SX_EEPvNS0_12preallocatedET0_OT1_]+0x10f): undefined reference to `jump_fcontext'
  /tmp/ccWQ5ZMf.o: In function `void boost::context::detail::context_entry&lt;boost::context::detail::record&lt;boost::context::continuation, boost::context::basic_fixedsize_stack&lt;boost::context::stack_traits&gt;, std::_Bind&lt;std::_Mem_fn&lt;boost::context::continuation (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;::*)(boost::context::continuation&amp;&amp;)&gt; (boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;*, std::_Placeholder&lt;1&gt;)&gt; &gt; &gt;(boost::context::detail::transfer_t)':
  simple.cpp:(.text._ZN5boost7context6detail13context_entryINS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEEEEvNS1_10transfer_tE[_ZN5boost7context6detail13context_entryINS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEEEEvNS1_10transfer_tE]+0x70): undefined reference to `jump_fcontext'
  simple.cpp:(.text._ZN5boost7context6detail13context_entryINS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEEEEvNS1_10transfer_tE[_ZN5boost7context6detail13context_entryINS1_6recordINS0_12continuationENS0_21basic_fixedsize_stackINS0_12stack_traitsEEESt5_BindIFSt7_Mem_fnIMNS_6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEEFS4_OS4_EEPSO_St12_PlaceholderILi1EEEEEEEEvNS1_10transfer_tE]+0xc9): undefined reference to `ontop_fcontext'
  /tmp/ccWQ5ZMf.o: In function `boost::fibers::worker_context&lt;void (&amp;)(std::__cxx11::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;, int), char const*, int&gt;::~worker_context()':
  simple.cpp:(.text._ZN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEED2Ev[_ZN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEED5Ev]+0x20): undefined reference to `boost::fibers::context::~context()'
  /tmp/ccWQ5ZMf.o:(.rodata._ZTIN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEE[_ZTIN5boost6fibers14worker_contextIRFvRKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEiEJPKciEEE]+0x10): undefined reference to `typeinfo for boost::fibers::context'
  collect2: error: ld returned 1 exit status
  </code></pre>