title: undefined reference to `boost::log_mt_posix::basic_attribute_set<char>::~basic_attribute_set()'
body: <p>Newbie question... I'm trying out Boost for the first time because I want to test drive the <a href="http://boost-log.sourceforge.net/libs/log/doc/html/index.html">Boost Log</a> library. I built this test program...</p>
  
  <pre><code>#include &lt;boost/log/trivial.hpp&gt;
  #include &lt;iostream&gt;
  
  int fibonacci(int num) {
      int i;
      int a = 1;
      int b = 1;
  
      for (i = 2; i &lt;= num; ++i) {
          BOOST_LOG_TRIVIAL(info) &lt;&lt; "Iteration " &lt;&lt; i &lt;&lt; " (a = " &lt;&lt; a &lt;&lt; ", b = " &lt;&lt; b &lt;&lt; ")...";
          b = a + b;
          a = b - a;
      }
  
      return a;
  }
  
  int main() {
      std::cout &lt;&lt; "8th fibonacci number: " &lt;&lt; fibonacci(8) &lt;&lt; std::endl;
      return 0;
  }
  </code></pre>
  
  <p>Compile data:</p>
  
  <pre><code>**** Build of configuration Debug for project LoggingCpp ****
  
  make all 
  Building file: ../main.cpp
  Invoking: GCC C++ Compiler
  g++ -O0 -g3 -Wall -c -fmessage-length=0 -lpthread -MMD -MP -MF"main.d" -MT"main.d" -o"main.o" "../main.cpp"
  Finished building: ../main.cpp
  
  Building target: LoggingCpp
  Invoking: GCC C++ Linker
  g++ -lpthread -o"LoggingCpp"  ./main.o   
  ./main.o: In function `~basic_logger':
  /usr/include/boost/log/sources/basic_logger.hpp:90: undefined reference to `boost::log_mt_posix::basic_attribute_set&lt;char&gt;::~basic_attribute_set()'
  ./main.o: In function `boost::log_mt_posix::trivial::logger::construct_logger()':
  /usr/include/boost/log/trivial.hpp:102: undefined reference to `boost::log_mt_posix::trivial::aux::init()'
  ./main.o: In function `void boost::call_once&lt;void (*)()&gt;(boost::once_flag&amp;, void (*)())':
  /usr/include/boost/thread/pthread/once.hpp:51: undefined reference to `boost::detail::get_once_per_thread_epoch()'
  /usr/include/boost/thread/pthread/once.hpp:55: undefined reference to `boost::detail::once_epoch_mutex'
  /usr/include/boost/thread/pthread/once.hpp:66: undefined reference to `boost::detail::once_epoch_mutex'
  /usr/include/boost/thread/pthread/once.hpp:77: undefined reference to `boost::detail::once_global_epoch'
  /usr/include/boost/thread/pthread/once.hpp:77: undefined reference to `boost::detail::once_global_epoch'
  /usr/include/boost/thread/pthread/once.hpp:77: undefined reference to `boost::detail::once_global_epoch'
  /usr/include/boost/thread/pthread/once.hpp:78: undefined reference to `boost::detail::once_epoch_cv'
  /usr/include/boost/thread/pthread/once.hpp:84: undefined reference to `boost::detail::once_epoch_mutex'
  /usr/include/boost/thread/pthread/once.hpp:84: undefined reference to `boost::detail::once_epoch_cv'
  /usr/include/boost/thread/pthread/once.hpp:88: undefined reference to `boost::detail::once_global_epoch'
  /usr/include/boost/thread/pthread/once.hpp:73: undefined reference to `boost::detail::once_epoch_cv'
  ./main.o: In function `record_pump':
  /usr/include/boost/log/sources/record_ostream.hpp:293: undefined reference to `boost::log_mt_posix::aux::stream_provider&lt;char&gt;::allocate_compound(boost::log_mt_posix::basic_record&lt;char&gt; const&amp;)'
  ./main.o: In function `~auto_release':
  /usr/include/boost/log/sources/record_ostream.hpp:280: undefined reference to `boost::log_mt_posix::aux::stream_provider&lt;char&gt;::release_compound(boost::log_mt_posix::aux::stream_provider&lt;char&gt;::stream_compound*)'
  ./main.o: In function `boost::log_mt_posix::sources::aux::logger_singleton&lt;boost::log_mt_posix::trivial::logger&gt;::init_instance()':
  /usr/include/boost/log/sources/global_logger_storage.hpp:126: undefined reference to `boost::log_mt_posix::sources::aux::global_storage&lt;char&gt;::get_or_init(std::type_info const&amp;, boost::function0&lt;boost::shared_ptr&lt;boost::log_mt_posix::sources::aux::logger_holder_base&gt; &gt; const&amp;)'
  /usr/include/boost/log/sources/global_logger_storage.hpp:147: undefined reference to `boost::log_mt_posix::odr_violation::throw_(char const*, unsigned long, std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
  ./main.o: In function `boost::log_mt_posix::sources::aux::severity_level&lt;boost::log_mt_posix::trivial::severity_level&gt;::set_value(boost::log_mt_posix::trivial::severity_level)':
  /usr/include/boost/log/sources/severity_feature.hpp:95: undefined reference to `boost::log_mt_posix::sources::aux::set_severity_level(int)'
  ./main.o: In function `boost::log_mt_posix::basic_record&lt;char&gt; boost::log_mt_posix::sources::basic_logger&lt;char, boost::log_mt_posix::sources::severity_logger_mt&lt;boost::log_mt_posix::trivial::severity_level&gt;, boost::log_mt_posix::sources::multi_thread_model&lt;boost::log_mt_posix::aux::light_rw_mutex&gt; &gt;::open_record_unlocked&lt;boost::parameter::aux::tagged_argument&lt;boost::log_mt_posix::keywords::tag::severity, boost::log_mt_posix::trivial::severity_level const&gt; &gt;(boost::parameter::aux::tagged_argument&lt;boost::log_mt_posix::keywords::tag::severity, boost::log_mt_posix::trivial::severity_level const&gt; const&amp;)':
  /usr/include/boost/log/sources/basic_logger.hpp:269: undefined reference to `boost::log_mt_posix::basic_core&lt;char&gt;::open_record(boost::log_mt_posix::basic_attribute_set&lt;char&gt; const&amp;)'
  ./main.o: In function `boost::log_mt_posix::sources::basic_logger&lt;char, boost::log_mt_posix::sources::severity_logger_mt&lt;boost::log_mt_posix::trivial::severity_level&gt;, boost::log_mt_posix::sources::multi_thread_model&lt;boost::log_mt_posix::aux::light_rw_mutex&gt; &gt;::push_record_unlocked(boost::log_mt_posix::basic_record&lt;char&gt; const&amp;)':
  /usr/include/boost/log/sources/basic_logger.hpp:280: undefined reference to `boost::log_mt_posix::basic_core&lt;char&gt;::push_record(boost::log_mt_posix::basic_record&lt;char&gt; const&amp;)'
  ./main.o: In function `basic_logger&lt;boost::parameter::aux::tagged_argument&lt;boost::log_mt_posix::keywords::tag::severity, const boost::log_mt_posix::trivial::severity_level&gt; &gt;':
  /usr/include/boost/log/sources/basic_logger.hpp:145: undefined reference to `boost::log_mt_posix::basic_core&lt;char&gt;::get()'
  /usr/include/boost/log/sources/basic_logger.hpp:145: undefined reference to `boost::log_mt_posix::basic_attribute_set&lt;char&gt;::basic_attribute_set()'
  ./main.o: In function `~pair':
  /usr/include/c++/4.5/bits/stl_pair.h:72: undefined reference to `boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt;::~basic_slim_string()'
  /usr/include/c++/4.5/bits/stl_pair.h:72: undefined reference to `boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt;::~basic_slim_string()'
  ./main.o: In function `basic_logger':
  /usr/include/boost/log/sources/basic_logger.hpp:135: undefined reference to `boost::log_mt_posix::basic_core&lt;char&gt;::get()'
  /usr/include/boost/log/sources/basic_logger.hpp:135: undefined reference to `boost::log_mt_posix::basic_attribute_set&lt;char&gt;::basic_attribute_set(boost::log_mt_posix::basic_attribute_set&lt;char&gt; const&amp;)'
  ./main.o: In function `boost::log_mt_posix::basic_attribute_set&lt;char&gt;::reference_proxy::operator=(boost::shared_ptr&lt;boost::log_mt_posix::attribute&gt; const&amp;) const':
  /usr/include/boost/log/attributes/attribute_set.hpp:121: undefined reference to `boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt;::basic_slim_string(char const*, unsigned long)'
  /usr/include/boost/log/attributes/attribute_set.hpp:121: undefined reference to `boost::log_mt_posix::basic_attribute_set&lt;char&gt;::insert(boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt; const&amp;, boost::shared_ptr&lt;boost::log_mt_posix::attribute&gt; const&amp;)'
  /usr/include/boost/log/attributes/attribute_set.hpp:121: undefined reference to `boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt;::~basic_slim_string()'
  /usr/include/boost/log/attributes/attribute_set.hpp:121: undefined reference to `boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt;::~basic_slim_string()'
  ./main.o: In function `pair&lt;std::basic_string&lt;char&gt;, boost::shared_ptr&lt;boost::log_mt_posix::attribute&gt; &gt;':
  /usr/include/c++/4.5/bits/stl_pair.h:116: undefined reference to `boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt;::basic_slim_string(std::basic_string&lt;char, std::char_traits&lt;char&gt;, std::allocator&lt;char&gt; &gt; const&amp;)'
  ./main.o: In function `boost::log_mt_posix::basic_attribute_set&lt;char&gt;::insert(std::pair&lt;boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt; const, boost::shared_ptr&lt;boost::log_mt_posix::attribute&gt; &gt; const&amp;)':
  /usr/include/boost/log/attributes/attribute_set.hpp:507: undefined reference to `boost::log_mt_posix::basic_attribute_set&lt;char&gt;::insert(boost::log_mt_posix::basic_slim_string&lt;char, std::char_traits&lt;char&gt; &gt; const&amp;, boost::shared_ptr&lt;boost::log_mt_posix::attribute&gt; const&amp;)'
  ./main.o: In function `boost::log_mt_posix::sources::aux::severity_level&lt;boost::log_mt_posix::trivial::severity_level&gt;::dispatch(boost::log_mt_posix::type_dispatcher&amp;)':
  /usr/include/boost/log/sources/severity_feature.hpp:105: undefined reference to `boost::log_mt_posix::sources::aux::get_severity_level()'
  ./main.o: In function `boost::log_mt_posix::sources::aux::severity_level&lt;boost::log_mt_posix::trivial::severity_level&gt;::detach_from_thread()':
  /usr/include/boost/log/sources/severity_feature.hpp:118: undefined reference to `boost::log_mt_posix::sources::aux::get_severity_level()'
  collect2: ld returned 1 exit status
  make: *** [LoggingCpp] Error 1
  </code></pre>
  
  <p><a href="http://boost-log.sourceforge.net/libs/log/doc/html/log/tutorial.html#log.tutorial.trivial">About Boost Log syntax</a></p>
  
  <p>Did I install Boost Log incorrectly? Am I missing crucial libraries? Did I omit necessary linker flags?</p>