title: Import Error on boost python hello program
body: <h1>include </h1>
  
  <pre><code>using namespace boost::python;
  
  struct World{
      void set(std::string msg) { this-&gt;msg = msg; }
      std::string greet() { return msg; }
      std::string msg;
  };
  
  BOOST_PYTHON_MODULE(hello)
  {
      class_&lt;World&gt;("World")
          .def("greet", &amp;World::greet)
          .def("set", &amp;World::set)
      ;
  }
  </code></pre>
  
  <p>Compile and build ok</p>
  
  <pre><code>~/boost$ g++ -fPIC -I/usr/include/python2.6 -c hello.cpp 
  ~/boost$ g++ -shared hello.o -o hello.so
  </code></pre>
  
  <p>But when import from python side, got error.</p>
  
  <pre><code>&gt;&gt;&gt; import hello.so
  Traceback (most recent call last):
    File "&lt;stdin&gt;", line 1, in &lt;module&gt;
  ImportError: ./hello.so: undefined symbol: _ZNK5boost6python7objects21py_function_impl_base9max_arityEv
  &gt;&gt;&gt; 
  </code></pre>