[C++-sig] errors compiling Boost Python example

Joel Uckelman uckelman at nomic.net
Thu Jul 5 13:10:07 CEST 2012


Thus spake Sybren A. Stüvel:
> 
> Hi Joel,
> 
> On 5 July 2012 12:21, Joel Uckelman <uckelman at nomic.net> wrote:
> 
> > I'm trying to compile the example from the Boost Python docs without
> > success. [...]
> >
> 
> There are many ways in which you can fix this. I think the easiest one from
> an I'm-just-starting-so-please-give-me-a-simple-hello-world-program point
> of view is to replace "char const *" with "std::string". That works on my
> machine (Python 3.2, VS2010, Boost 1.48).

Yes, I can compile if I switch to std::string as the return type. Thanks
for that.

Do you know why Boost Python complains about returning a char const*?
It's a strange thing to have for the first example in the docs if it
won't compile.
 
-- 
J.


More information about the Cplusplus-sig mailing list