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

Charles Lesire-Cabaniols Charles.Lesire at onera.fr
Thu Jul 10 09:32:57 CEST 2008

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
- gccxml 0.7.0
- g++ 4.2.3

Thanks for your help!

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Charles_Lesire.vcf
Type: text/x-vcard
Size: 339 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20080710/4d0f4077/attachment.vcf>

More information about the Cplusplus-sig mailing list