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

Jens B. Jorgensen jorgensen at getcollc.com
Wed Jun 15 14:00:01 CEST 2005


> -----Original Message-----
> From: c++-sig-bounces at python.org [mailto:c++-sig-bounces at python.org]On
> Behalf Of David Abrahams
> Sent: Tuesday, June 14, 2005 12:59 PM
> To: c++-sig at python.org
> Subject: Re: [C++-sig] examples compile but give exception 
> (win32; intel
> 8.1;dinkumware 3.08)
> 
> 
> "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?

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?

> 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? 

Thanks again for any suggestions or pointers. 



More information about the Cplusplus-sig mailing list