[C++-sig] examples compile but give exception (win32; intel 8.1; dinkumware 3.08)
David Abrahams
dave at boost-consulting.com
Wed Jun 15 17:56:02 CEST 2005
"Jens B. Jorgensen" <jorgensen at getcollc.com> writes:
>> Looks like a problem with RTTI. Did you perhaps have it turned off
>> in your extension module?
>
> Nope, definitely left that on. I guess I'll have to debug into the
> code. Any pointers on the best place to start looking for that? It's a
> little confusing since everything is declarative. Is the error
> triggered by an exception? A cast that fails? How does it work?
Well, it's triggered by a failure to find a matching __init__
overload. The code that searches the overload set is in
function::call in libs/python/src/object/function.cpp. The matching
of a particular overload is done in this code:
// Call the function. Pass keywords in case it's a
// function accepting any number of keywords
PyObject* result = inner_args ? f->m_fn(inner_args.get(), keywords) : 0;
There's quite a lot of detail that goes into that.
I would also recompile the Boost.Python library with
BOOST_PYTHON_TRACE_REGISTRY #defined, e.g.
bjam "-sBUILD=<define>BOOST_PYTHON_TRACE_REGISTRY" ...
The output you get when you try to run your extension module could be
illuminating.
>> Incidentally, I think you went about making the toolset the hard
>> way. Seems like using a rather big hammer to be manually injecting
>> the compiler flags; you might easily be countermanding something
>> that the build system is doing on purpose in order to make
>> Boost.Python work on intel-windows.
>>
>> I would take intel-win32-stlport-tools.jam as my model if I were
>> you.
>
> That's pretty much what I did, although I started with
> intel-win32-tools.jam. Rest assured I didn't generate it from
> scratch. The main thing I started from was that I needed to link to
> the Dinkumware stdlib and then dealt with all the stuff that broke.
>
> One thing that I haven't quite figured out yet: I see postings here
> and there referring to tests that can be built and run but I haven't
> yet figured out how to get them built. Is there actually any
> documentation around that indicates how this is to be done?
http://www.boost.org/libs/python/doc/building.html#testing
--
Dave Abrahams
Boost Consulting
www.boost-consulting.com
More information about the Cplusplus-sig
mailing list