On 3/10/07, Piotr Jaroszynski <p.jaroszynski gmail.com> wrote:
> Hello,
>
> I have written a simple hello.cpp - [1], which doesn't
compile - [2]. After
> some "investigation" I have tracked down the
problem to boost/python/str.hpp
> header. Removing str.hpp and numeric.hpp, which
includes it, from python.hpp
> make the hello.cpp compile and work just fine:
> >>> import hello
> >>> blah = hello.World()
> >>> blah.set("foo")
> >>> print blah
> foo
>
> System info:
> boost=1.33.1, gcc-4.1.2, glibc-2.5, kernel
2.6.20-gentoo x86_64, python-2.4.4
>
> [1] = http://dev.gentooexperimental.org/~peper/boost/hello.cpp
> [2] - http://dev.gentooexperimental.org/~peper/boost/hello.e
rror
This is a known problem/bug. The work around is pretty
simple: use
boost::python::self_ns::str instead of boost::python::str.
--
Roman Yakovenko
C++ Python language binding
http://www.language-
binding.net/
_______________________________________________
C++-sig mailing list
C++-sig python.org
http:
//mail.python.org/mailman/listinfo/c++-sig
|