[C++-sig] python error when running release build

David GD Wilson david at drysdale-wilson.com
Mon Aug 5 22:03:42 CEST 2002


Hi,

I have a simple 3D vector class that exposes some operators and member
variables to python.

I compile my vector dll in debug mode and everything behaves as
expected:

>>> a = core.CVector()
>>> a
<core.CVector object at 0x00877428>
>>> a.x
0.0

However when I compile my vector dll in release mode python comes back
with the following when I try to access any of the member variables or
operators:

>>> a = core.CVector()
>>> a
<core.CVector object at 0x008A4118>
>>> a.x
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: bad argument type for built-in operation

I am using boost.python v2, and VC.NET. Is there any know issue that I
am unaware of that effects release builds with boost.python v2?

Any help much appreciated :)

David





More information about the Cplusplus-sig mailing list