[C++-sig] Hello World Tutorial using Pyste does not work!

Roman Yakovenko roman.yakovenko at gmail.com
Sun Jul 13 11:04:00 CEST 2008


2008/7/10 Charles Lesire-Cabaniols <Charles.Lesire at onera.fr>:
> Hi folks.
>
> I have some troubles using pyste to wrap the Hello World sample.
>
> Here are the files I use:
>
> // world.h
> struct World {
>        std::string msg;
>        void set(std::string msg) {this->msg = msg;}
>        std::string get() {return msg;}
> }
>
> ## world.pyste
> Class('World', 'world.h')
>
>
> When launching
>> pyste --module=hello world.pyste
> I get the following error coming from gccxml:
>
> world.h:3: error: 'string' undeclared in namespace 'std'
> ...
> ...
>
> If I had a
> #include <string>
> to world.h, I get the error:
>
> In file included from /usr/include/c++/4.2/string:45,
>                 from world.h:1:
> /usr/include/c++/4.2/i486-linux-gnu/bits/c++config.h:149: error: syntax
> error before '__attribute__'
>
> with at the end a CppParserError 'Error executing gccxml'
>
> My configuration:
> - Ubuntu 8.04(hardy)
> - python 2.5.2
> - pyste 0.9.30

This tool is not maintained.

> - gccxml 0.7.0

This release is also pretty old and not supported.


I suggest you to try Py++ and CVS version of gccxml

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



More information about the Cplusplus-sig mailing list