[C++-sig] more cross-module problems
greg Landrum
greglandrum at mindspring.com
Wed Jul 23 20:28:05 CEST 2003
Dave's patch cleared up the exception problems I reported yesterday, but
I've got more cross-module problems to report.
The attached zip file will create a directory called RDTest. If you
extract it in $Boost/libs/python, you'll end up with something that can be
built with bjam. I apologize in advance for the names of things here...
The Jamfile runs two tests, both of which use multiple modules and explore
passing objects between them. One of the tests works on Windows and fails
on Linux, the other works on Linux and fails on Windows.
The first test (named both_mods in the Jamfile) explores what happens if
classes with boost::any data members are passed between modules. This test
works fine on Windows but fails on Linux with the error:
RuntimeError: boost::bad_any_cast: failed conversion using
boost::any_cast
The second test (named CM2_test) creates three modules (modulea, moduleb
and modulec). modulea and modulec define simple classes (classA and
classC) that use STL containers to map std::strings -> integers. classA
does this with an std::map and classC does it with an std::vector of
std::pairs. As the test demonstrates, both these modules work ok by
themselves. moduleb has 2 functions: testCrossA() takes a classA instance
and gets a property from it; testCrossC() takes a classC instance and gets
a property. moduleb works without problems on Linux, but the test using
classA instances (which carry around std::maps) fails on Windows with the
dread:
RuntimeError: unidentifiable C++ exception
error.
Platform notes;
Windows = [Win2K, MSVC v6, python 2.2, boost 1.30.0]
Linux = [RH8.0, g++ 3.2, python 2.2, boost 1.30.0]
Thanks,
-greg
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RDTest.zip
Type: application/zip
Size: 6424 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20030723/bcc592d6/attachment.zip>
More information about the Cplusplus-sig
mailing list