[Pyrex] newbie problem with wrapping c++ code
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Apr 11 08:09:32 CEST 2008
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
More information about the Pyrex
mailing list