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

Nikolay Mladenov nickm at sitius.com
Mon Apr 14 23:56:01 CEST 2008


I couldn't duplicate this on with :

~/tmp/boost_1_34_0_RC.svn/libs/python/test$ gcc --version
gcc (GCC) 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
Copyright (C) 2006 Free Software Foundation, Inc.

could you post the error again, the way it is generated from your
example?

Nikolay Mladenov

Stuart Marsden wrote:
> 
> 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