[C++-sig] Another BPLV2 newbie...
Hugo van der Merwe
hugo at adept.co.za
Thu Jun 27 00:29:29 CEST 2002
> If you need support for more arguments, you can set #define
> BOOST_PYTHON_MAX_ARITY to the number of arguments you need to support. You
> can do this on the compiler command-line with -DBOOST_PYTHON_MAX_ARITY=20
I must rebuild Boost.Python with that parameter I take it. (Just setting
it in my code didn't work. Though it did slow down a simple example from
5 seconds compile time to 10 seconds... so it did *something* ;) I will
try this "tomorrow" (after sleep). (My timezone is "+0200"). For now I
have commented the .def for the one horrible 17 parameter method...
Interesting thing I did notice, even with this commented, I need to pass
gcc a -ftemplate-depth-35 parameter (I'm using GCC 2.95.4.
-ftemplate-depth-34 doesn't work.) I'll do some "trimming" of my code
later to find out exactly what causes this to be required...
> Looks like a missing #include <boost/python/class.hpp> to me.
That's what it was, yes, thanks.
> > 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.)
>
> Don't use "jam"; the executable you want is "bjam" (the name matters).
I ran make in the tools/build/jam_src directory, then I ran
bin.linuxx86/bjam install - this installed a "jam" named binary only,
though it is identical to the "bjam" also in that dir. I realise "bjam"
is to distinguish between boost's jam and the original - I suggest the
tools/build/jam_src/Jamfile be adjusted to install a "bjam"-named binary
by default then instead?
One last thing I will get back to investigating later:
>>> import test_module
Traceback (most recent call last):
File "<stdin>", line 1, in ?
ImportError: /home/hugo/Programming/boost/libs/python/bin/libbpl.so/gcc/release/inlining-on/runtime-link-dynamic/shared-linkable-true/libbpl.so.1.29.0: undefined symbol: PyType_GenericAlloc
Anyone have a tip to lessen the amount of time I'll spend scratching my
head?
Thanks!
Hugo van der Merwe
More information about the Cplusplus-sig
mailing list