[C++-sig] Problem with boost.python 1.35.0

Stuart Marsden stuart at myphones.com
Fri Apr 11 10:34:00 CEST 2008


Hi,

this looks like the same problem - have created a simple test case this 
works on 1.35.0 on Centos 4 (gcc 3.4.6) but gives the same error as 
previous post on Centos 5 (4.1.2)

more test.cpp
#include <boost/python/class.hpp>
#include <boost/python/module.hpp>
#include <boost/python/def.hpp>
#include <iostream>
#include <string>
#include <assert.h>
#include <sstream>
#include <boost/bind.hpp>
#include <cstdlib>

namespace
{

  class Test
  {
  public:
    Test (int aa, int bb, std::string  cc)
    {
    }
    ~Test ()
    {
    }
    int start (std::string ddd, int ee)
    {
    return 1;
    }
    int getport ()
    {
    return 1;
    }
  private:
  };
}

BOOST_PYTHON_MODULE (test)
{
  using namespace boost::python;
  class_ < Test > ("Test", init < int, int, std::string >())
    // Add regular member functions
    .def ("getport", &Test::getport)
    .def ("start", &Test::start )
    ;
}



More information about the Cplusplus-sig mailing list