[Pyrex] newbie problem with wrapping c++ code
Hoyt Koepke
hoytak at gmail.com
Fri Apr 11 08:50:07 CEST 2008
Thank you, this helps!
-- Hoyt
On Thu, Apr 10, 2008 at 11:09 PM, Greg Ewing
<greg.ewing at canterbury.ac.nz> wrote:
> Hoyt Koepke wrote:
>
> > ccode/test.h is just:
> >
> > ++++++++++++++++++++++++++++
> > void hello_world();
> > ++++++++++++++++++++++++++++
> >
>
> Pyrex currently only wraps C++ functions that use C calling
> conventions.
>
> You need
>
> extern "C" void hello_world();
>
> otherwise the name gets mangled and doesn't match the
> plain C name "hello_world" that the Pyrex-generated code
> is using.
>
> --
> Greg
>
--
+++++++++++++++++++++++++++++++++++
Hoyt Koepke
UBC Department of Computer Science
http://www.cs.ubc.ca/~hoytak/
hoytak at gmail.com
+++++++++++++++++++++++++++++++++++
More information about the Pyrex
mailing list