Re: newbie problem with wrapping c++ code

"Hoyt Koepke" <[email protected]>
Newsgroups gmane.comp.python.pyrex
Message-ID <[email protected]>
Thank you, this helps!

-- Hoyt

On Thu, Apr 10, 2008 at 11:09 PM, Greg Ewing
<[email protected]> 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/
[email protected]
+++++++++++++++++++++++++++++++++++
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.