[C++-sig] examples compile but give exception (win32; intel 8.1; dinkumware 3.08)

David Abrahams dave at boost-consulting.com
Tue Jun 14 19:59:17 CEST 2005


"Jens B. Jorgensen" <jorgensen at getcollc.com> writes:

> Sorry, the below makes me look like an idiot (I'm not asserting I'm not, but what you see below is actually not what I intended). Clearly the hello constructor in getting_started2 requires an argument. I first saw the error below in a different piece of code (one I wrote) and I quickly tried the example to verify that I was getting the same thing. In any case, writing proper Python I get: 
>
> Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import getting_started2
>>>> h = getting_started2.hello('hello, world')
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> Boost.Python.ArgumentError: Python argument types in
>     hello.__init__(hello, str)
> did not match C++ signature:
>     __init__(struct _object *, class std::basic_string<char,struct std::char_tra
> its<char>,class std::allocator<char> >)
>>>>

Looks like a problem with RTTI.  Did you perhaps have it turned off in
your extension module?

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.

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com




More information about the Cplusplus-sig mailing list