Boost logo

Boost Users :

From: David Brownell (yg-boost-users_at_[hidden])
Date: 2003-06-17 00:27:46


I am trying to run the hello.World class example in the tutorial and am
running into problems. I can compile the dll fine, and then copy the dll
(and the boost_python.dll) into my python directory, and then start my
Python interpreter. The library will import, but when I call either the
greet or set methods, I get the following errors from within the Python
interpreter:

[greet]:
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
TypeError: unbound method Boost.Python.function object must be called with
World instance as first argument (got str instance instead)

[set]:
Traceback (most recent call last):
  File "<interactive input>", line 1, in ?
TypeError: unbound method Boost.Python.function object must be called with
World instance as first argument (got nothing instead)

I am failrly new to Python and even newer to Boost.Python, so there may be
something very basic that I am missing. I am using boost 1.30, bjam to
compile, MSVC 7.1, Python 2.2, and Windows XP. Note that I can compile and
successfully execute the inital Hello World example (hello.cpp in the
tutorial subdir).

Thanks in advance for your help!
David Brownell


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net