title: how to get boost::serialization to work?
body: <p>I'm working on ubuntu 12.04LTS and using clang 3.4.</p>
  
  <p>I have a CMake project and want to use the boost serialization library. I downloaded boost 1.55.0 from SourceForge.</p>
  
  <p>My project folder tree looks like:</p>
  
  <pre><code>MyProject
      |    Source
      |       |    main.cpp
      |       |    CMakeLists.txt
      |    Build
      |    Libraries
      |       |    Boost1p55p0
      |       |         |    boost
      |       |         |    ...other boost data
      |       |         |    build
      |       |         |       |    include
      |       |         |       |    lib
  </code></pre>
  
  <p>So in the <code>Boost1p55p0</code> directory I made a new directory <code>build</code>, so that bootstrap looked like:</p>
  
  <pre><code>./bootstrap.sh --prefix=build/
  </code></pre>
  
  <p>Then I did</p>
  
  <pre><code>./b2
  </code></pre>
  
  <p>and </p>
  
  <pre><code>./b2 install
  </code></pre>
  
  <p>So the minimal not-working example is:</p>
  
  <p>CMakeLists.txt:</p>
  
  <pre><code>cmake_minimum_required (VERSION 2.6)
  
  set( CMAKE_C_COMPILER clang )
  set( CMAKE_CXX_COMPILER clang++ )
  set( CMAKE_LINKER llvm-link )
  
  project (Test)
  include_directories( ${PROJECT_SOURCE_DIR} ../Libraries/Boost1p55p0/build/include )
  
  set( sources ${sources} main )
  
  add_executable(Test ${sources})
  
  set( OperatingSystem "Linux" )
  set( CMAKE_CXX_FLAGS "-std=c++11" )
  
  find_library( PATH_TO_BoostSerialization boost_serialization ../Libraries/Boost1p55p0/build/lib/ )
  
  target_link_libraries (Test ${PATH_TO_BoostSerialization})
  </code></pre>
  
  <p>main.cpp (from the <a href="http://www.boost.org/doc/libs/1_55_0/libs/serialization/doc/index.html" rel="nofollow">tutorial</a> but with xml archives) :</p>
  
  <pre><code>#include &lt;fstream&gt;
  #include &lt;string&gt;
  
  // include headers that implement a archive in simple text format
  #include &lt;boost/archive/xml_oarchive.hpp&gt;
  #include &lt;boost/archive/xml_iarchive.hpp&gt;
  
  /////////////////////////////////////////////////////////////
  // gps coordinate
  //
  // illustrates serialization for a simple type
  //
  class gps_position
  {
      private:
          friend class boost::serialization::access;
  
          template&lt;class Archive&gt;
          void serialize(Archive &amp; ar, const unsigned int version)
          {
              ar &amp; degrees;
              ar &amp; minutes;
              ar &amp; seconds;
          }
          int degrees;
          int minutes;
          float seconds;
      public:
          gps_position(){};
          gps_position(int d, int m, float s) :
              degrees(d), minutes(m), seconds(s){}
  };
  
  int main() {
      std::string inFileName = "testIn.xml";
      std::string outFileName = "testOut.xml";
      // create and open a character archive for output
      std::ofstream ofs(outFileName);
  
      // create class instance
      const gps_position g(35, 59, 24.567f);
  
      // save data to archive
      {
          boost::archive::xml_oarchive oa(ofs);
          // write class instance to archive
          oa &lt;&lt; g;
      }
  
      return 0;
  }
  </code></pre>
  
  <p>And now I get the following compiler error:</p>
  
  <pre><code>[cut off directory tree here]Boost1p55p0/build/include/boost/archive/basic_xml_oarchive.hpp:92:9: error: no matching function for call to
    'assertion_failed'
      BOOST_MPL_ASSERT((serialization::is_wrapper&lt; T &gt;));
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  [cut off directory tree here]Boost1p55p0/build/include/boost/mpl/assert.hpp:287:11: note: expanded from macro 'BOOST_MPL_ASSERT'
        boost::mpl::assertion_failed&lt;false&gt;( \
  </code></pre>
  
  <p>I don't have any idea where the error is. I'blessed if I know.</p>
  
  <p>Many thanks in advance</p>