title: C++ boost logging compile error (linux)
body: <p>Can anyone tell me what I'm doing wrong?</p>
  
  <p>Running this on the console yields the following error:</p>
  
  <blockquote>
    <p><code>#</code> c++ -I /var/local/boost_1_46_1/ log.cpp -o log -lboost-log<br>
    log.cpp: In function âvoid init()â:
    log.cpp:11: error: âboost::loggingâ has not been declared
    log.cpp:13: error: âboost::fltâ has not been declared
    log.cpp:13: error: âloggingâ has not been declared
    log.cpp:13: error: âloggingâ has not been declared</p>
  </blockquote>
  
  <p>I've also tried it explicitly linking the libraries from both stage and /usr/local/lib directories.</p>
  
  <p>My log.cpp:</p>
  
  <pre><code>#include &lt;boost/log/core.hpp&gt;
  #include &lt;boost/log/trivial.hpp&gt;
  #include &lt;boost/log/filters.hpp&gt;
  
  using namespace std;
  
  void init()
  {
      boost::logging::core::get()-&gt;set_filter
      (
          boost::flt::attr&lt; boost::logging::trivial::severity_level &gt;("Severity") &gt;= boost::logging::trivial::info
      );
  
  }
  
  }
  
  int main(int, char*[]) {
      BOOST_LOG_TRIVIAL(trace) &lt;&lt; "A trace severity message";
      BOOST_LOG_TRIVIAL(debug) &lt;&lt; "A debug severity message";
      BOOST_LOG_TRIVIAL(info) &lt;&lt; "An informational severity message";
      BOOST_LOG_TRIVIAL(warning) &lt;&lt; "A warning severity message";
      BOOST_LOG_TRIVIAL(error) &lt;&lt; "An error severity message";
      BOOST_LOG_TRIVIAL(fatal) &lt;&lt; "A fatal severity message";
  }
  </code></pre>
  
  <p>This code will compile if I leave out the <code>void init()</code> function...</p>