title: How do I build simple boost program on Mac OS (Lion)
body: <p>Steps: <br>
   1. sudo port boost <br>
  The boost file installed in /opt/local/boost, library files are in /opt/local/lib <br>
  <br>
   2. use XCode to create c++ project <br></p>
  
  <pre><code>#include &lt;iostream&gt;
  #include &lt;boost/asio.hpp&gt;
  int main () {
      return 0;
  }
  </code></pre>
  
  <p><br>
   3. set XCode to find out boost<br>
  in "Build Settings" -> "HEADER_SEARCH_PATHS" <br>
  in both Debug and Release add path /opt/local/include
  <br> <br>
  4.  "Build Settings" -> "LIBRARY_SEARCH_PATHS" --> add /opt/local/lib both for debug and release.
  <br><br>
  5. build program and failed. <br>
  Error Messages,</p>
  
  <pre><code>Undefined symbols for architecture x86_64:
    "boost::system::generic_category()", referenced from:
    ___cxx_global_var_init1 in main.o
    ___cxx_global_var_init2 in main.o
    "boost::system::system_category()", referenced from:
    ___cxx_global_var_init3 in main.o
    boost::asio::error::get_system_category() in main.o
    "boost::asio::error::get_netdb_category()", referenced from:
    ___cxx_global_var_init5 in main.o &lt;br&gt;
    "boost::asio::error::get_addrinfo_category()", referenced from:
    ___cxx_global_var_init6 in main.o &lt;br&gt;
    "boost::asio::error::get_misc_category()", referenced from:
    ___cxx_global_var_init7 in main.o &lt;br&gt;
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  </code></pre>
  
  <p>Am I wrong in the procedure? </p>