[C++-sig] KeyError: u'complex long double' in pyplusplus for a helloworld class

Tony Kirke tkirke at gmail.com
Thu Feb 16 18:52:33 CET 2006


I had this problem before too. You probably need the CVS version of gccxml
(and possibly for pyplusplus). That was what fixed it for me

On 2/16/06, Grant Tang <grant.tang at gmail.com> wrote:
>
> I am learning how to use pyplusplus. I hope I can use pyplusplus to
> substitute Pyste for our project.
> I just follow the code example in the tutorial:
>
> >>> import os
> >>> from pygccxml import parser
> >>> from pygccxml import declaration
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> ImportError: cannot import name declaration
> >>> from pygccxml import declarations
> >>> from pyplusplus import code_creators
> ImportError: cannot import name module_creators
> >>> from pyplusplus import module_creator
> >>> from pyplusplus import file_writers
> >>> class settings:
> ...     gccxml_path = '/usr/local/bin'
> ...     working_dir = '/home/gtang/tmp'
> ...
> >>> parser_config = parser.config_t( gccxml_path=settings.gccxml_path,
> working_directory=settings.working_dir )
> >>> decls_all = parser.parse( ['/home/gtang/test/pyplusplus _test/hello.h'],
> parser_config )
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
>   File "/usr/lib64/python2.4/site-packages/pygccxml/parser/__init__.py",
> line 25, in parse
>     answer = parser.read_files(files, compilation_mode)
>   File
> "/usr/lib64/python2.4/site-packages/pygccxml/parser/project_reader.py", line
> 61, in read_files
>     return self.__parse_file_by_file(files)
>   File
> "/usr/lib64/python2.4/site-packages/pygccxml/parser/project_reader.py", line
> 82, in __parse_file_by_file
>     decls = reader.read_file( header )
>   File
> "/usr/lib64/python2.4/site-packages/pygccxml/parser/source_reader.py", line
> 140, in read_file
>     raise error
> KeyError: u'complex long double'#include <iostream>
>
> I also tried to use pyplusplus GUI, got the same error message.
>
> the hello.h is:
> using namespace std;
>
> class A
> {
> public:
>         A() {cout << "class A's constructor..." << endl;}
>         ~A() {cout << "class A's destructor..." << endl;}
> };
>
> Thanks in advance,
>
>
> --
> Grant Tang
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060216/98f85f22/attachment.htm>


More information about the Cplusplus-sig mailing list