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

David Abrahams dave at boost-consulting.com
Mon Aug 5 22:25:24 CEST 2002


We just discovered this VC7 bug which causes static intializers to be
"optimized away" illegally.
We're working on a workaround. In the meantime, you can link your release
builds with:

    /link /opt:noref

If you're using bjam, add <linkflags>-link <linkflags>-opt:noref to your
BUILD variable.

    bjam -sBUILD="release <linkflags>-opt:noref" ...

HTH,
Dave

-----------------------------------------------------------
           David Abrahams * Boost Consulting
dave at boost-consulting.com * http://www.boost-consulting.com


----- Original Message -----
From: "David GD Wilson" <david at drysdale-wilson.com>
To: <c++-sig at python.org>
Sent: Monday, August 05, 2002 4:03 PM
Subject: [C++-sig] python error when running release build


> 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
>
>
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig





More information about the Cplusplus-sig mailing list