[C++-sig] Constructor w/ string
David Abrahams
david.abrahams at rcn.com
Wed Jun 12 00:19:16 CEST 2002
----- Original Message -----
From: "Scott A. Smith" <ssmith at magnet.fsu.edu>
To: <c++-sig at python.org>
Sent: Tuesday, June 11, 2002 5:51 PM
Subject: [C++-sig] Constructor w/ string
> Greetings,
>
> A simple problem I'll bet. I have three constructors in my
> (now very simple) class. One that takes no arguments, one that
> does self-construction, and one that takes a string. When I
> export these in Boost 1.25.0 all three work fine, but with 1.28.0
> only the first two work , the third always dies with complaints about
> a Debug Assertion Failure in dgbheap.c from the Python IDE.
What "Python IDE"?
> I hope someone can help me figure out the following:
>
> 1.) How to I change the export function to make this work again?
> 2.) Is there documentation that has this in detail?
>
> I often look through http://mail.python.org/pipermail/c++-sig/ and have
> used the new Google search on the main WWW page, but haven't found
anything.
> The getting_started2 example works OK and it also has a construtor that
> uses a string, but upon exiting the interpreter it gives the same error
> message when I add in empty & self constructors. (I am unclear on why
that
> example needs <iostream> and why exactly the const string& must be just
> string
> in the corresponding init function, however neither of these influences
my
> result.)
>
> I am using Python 2.2.1 & MSVC++ 6.0. My class header, code, and the
> Boost.Python interface are below if that helps. Note that in my
non-clipped
> verson I do actually use the string I construct with, same problem
though.
Your example works fine for me (at least with the current CVS state). The
enclosed Boost subproject demonstrates it (unpack to libs/python):
cd c:/boost/libs/python/smith/
myjam -sBUILD=debug-python -sTOOLS=msvc smith.test
...found 588 targets...
...updating 5 targets...
MkDir1 c:\build\libs\python\example\bin\smith.test
MkDir1 c:\build\libs\python\example\bin\smith.test\msvc
MkDir1 c:\build\libs\python\example\bin\smith.test\msvc\debug-python
MkDir1
c:\build\libs\python\example\bin\smith.test\msvc\debug-python\runtime-link-
dynamic
python-test-target
c:\build\libs\python\example\bin\smith.test\msvc\debug-python\runtime-link-
dynamic\smith.test
Adding parser accelerators ...
Done.
[3543 refs]
...updated 5 targets...
Compilation finished at Tue Jun 11 18:18:51
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smith.zip
Type: application/x-zip-compressed
Size: 1798 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20020611/15afe995/attachment.bin>
More information about the Cplusplus-sig
mailing list