[C++-sig] Another BPLV2 newbie...
Hugo van der Merwe
s13361562 at bach.sun.ac.za
Mon Jun 24 23:26:23 CEST 2002
I recently finally got round to taking a look at V2, and seeing if I can
do something with it. (Seems I can't ;)
I immediately ran into two things I don't know how to handle.
First is related to trying to wrap a library which has
constructors with many many parameters. With V1 the solution was:
python ../gen_all.py 20
20 isn't quite necessary. How do I do something similar with V2?
Second, what is wrong with this:
==== test.cpp ====
#define BOOST_PYTHON_V2
#include <boost/python/module.hpp>
class test
{
public:
test();
};
BOOST_PYTHON_MODULE_INIT(testmod)
{
boost::python::module testmod("testmod");
testmod
.add(
boost::python::class_<test>("test")
.def_init()
);
}
==== test.cpp ====
I get the following error tryinc to compile it:
demeter.cpp:42: type `boost::python::class_<Demeter::Settings,boost::python::detail::not_specified,boost::python::detail::not_specified,boost::python::detail::not_specified>' is not yet defined
I'm worried I might have broken something by trying gen_all.py, but the
tests appear to build fine. (I ran
$ jam -sPYTHON_VERSION=2.2 -sPYTHON_ROOT=/usr
in libs/python/test, with BOOST_ROOT set in environment.)
Thanks,
Hugo van der Merwe
More information about the Cplusplus-sig
mailing list