Aug. 30, 2006
12:10 p.m.
On 8/30/06, Qun Cao <quncao@gmail.com> wrote:
Hi Everyone,
I created a simple class wrapper like this
BOOST_PYTHON_MODULE(PythonTest) { class_<MyClass,boost::noncopyable>("pMyClass", init<char const*>()); }
When I try to initialize pMyClass in python, I got this error:
Traceback (most recent call last): File "<stdin>", line 1, in ? RuntimeError: unidentifiable C++ exception
The code generated by Py++ just works, may be you missed something? You can try to use make_consructor function: http://boost.org/libs/python/doc/v2/make_function.html#make_constructor-spec -- Roman Yakovenko C++ Python language binding http://www.language-binding.net/