title: Linker errors when using boost serialization
body: <p>I am using boost serialization. I compiled with: <code>-L/opt/local/lib -lboost_serialization -stdlib=libc++</code>, but got several (ungooglable) errors:</p>
  
  <pre>
  Undefined symbols for architecture x86_64:
    "boost::archive::text_oarchive_impl::save(std::__1::basic_string, std::__1::allocator > const&)", referenced from:
        void boost::archive::save_access::save_primitive, std::__1::allocator > >(boost::archive::text_oarchive&, std::__1::basic_string, std::__1::allocator > const&) in main.o
    "boost::archive::basic_text_oprimitive > >::~basic_text_oprimitive()", referenced from:
        boost::archive::text_oarchive_impl::~text_oarchive_impl() in main.o
    "boost::archive::text_oarchive_impl::text_oarchive_impl(std::__1::basic_ostream >&, unsigned int)", referenced from:
        boost::archive::text_oarchive::text_oarchive(std::__1::basic_ostream >&, unsigned int) in main.o
  ld: symbol(s) not found for architecture x86_64
  </pre>
  
  <p>I am serializing an <code>std::vector&lt;std::string&gt;</code>:</p>
  
  <pre><code>boost::archive::text_oarchive oa(std::cout);
  oa &lt;&lt; tasks;
  </code></pre>
  
  <p>Is there a problem with my installation of boost?</p>
  
  <hr>
  
  <p>The boost libraries are universal binaries containing both 32-bit and 64-bit machine code (so that's not the problem I guess):</p>
  
  <blockquote>
  <pre>
  $ file libboost_serialization.dylib
  libboost_serialization.dylib: Mach-O universal binary with 2 architectures
  libboost_serialization.dylib (for architecture i386): Mach-O dynamically linked shared library i386
  libboost_serialization.dylib (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
  </pre>
  </blockquote>
  
  <p>I installed boost using <code>sudo port install boost +universal</code> on Mac OS X 10.7.</p>