[C++-sig] Problems with boost tuples to python conversion

Roman Yakovenko roman.yakovenko at gmail.com
Sat Mar 27 19:12:45 CET 2010


On Sat, Mar 27, 2010 at 8:18 PM, Maciej Sitarz <macieksitarz at wp.pl> wrote:
> Hi,
> I tried to expose objects of class:
> typedef boost::tuple<ClassA, std::string> RegisterResult;
> to python.
>
> I used automatic conversion
> (http://www.language-binding.net/pyplusplus/troubleshooting_guide/automatic_conversion/automatic_conversion.html)
> but as usual I hit a wall and got unsolvable error.
>
> INFO gccxml cmd: /usr/bin/gccxml  -I"."
> -I"/home/macieks/error_examples/boost_tuples_to_python" -I"/usr/include"
> -I"/usr/include/python2.4" -I"/home/macieks/boost/boost_1_42_0" "test.h"
> -fxml="/tmp/tmp9Kp4rg.xml"
> Traceback (most recent call last):
>  File "generate.py", line 14, in ?
>    indexing_suite_version=2
>  File
> "usr/lib/python2.4/site-packages/pyplusplus/module_builder/boost_python_builder.py",
> line 95, in __init__
>  File
> "usr/lib/python2.4/site-packages/pyplusplus/module_builder/boost_python_builder.py",
> line 138, in __parse_declarations
>  File "usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py",
> line 217, in read_files
>  File "usr/lib/python2.4/site-packages/pygccxml/parser/project_reader.py",
> line 242, in __parse_file_by_file
>  File "usr/lib/python2.4/site-packages/pygccxml/parser/source_reader.py",
> line 206, in read_file
>  File "usr/lib/python2.4/site-packages/pygccxml/parser/source_reader.py",
> line 231, in read_gccxml_file
> pygccxml.parser.source_reader.gccxml_runtime_error_t: Error occured while
> running GCC-XML: /home/macieks/boost/boost_1_42_0/boost/mpl/bool_fwd.hpp:21:
> sorry, unimplemented: call_expr cannot be mangled due to a defect in the C++
> ABI
>

Unfortunately, GCCXML is not able to compile many of the Boost
libraries. You will have to change your code.

Sorry, but I don't have better solution for you.

-- 
Roman Yakovenko
C++ Python language binding
http://www.language-binding.net/


More information about the Cplusplus-sig mailing list