Compiling extension for 2.0b1

robin at robin at
Sat Sep 16 23:59:58 CEST 2000

In article <39c3a6b9.8147312 at>,
  howard at wrote:
> On Thu, 14 Sep 2000 18:42:23 GMT, howard at wrote:
> >I am getting compile errors trying to compile a SWIG 1.1 extension to
> >work with 2.0b1.
> >
> >The errors look like:
> >
> >Compiling...
> >pycdx3_wrap.cxx
> >D:\Microsoft Visual Studio\VC98\INCLUDE\math.h(514) : error C2894:
> >templates cannot be declared to have 'C' linkage
> >D:\Microsoft Visual Studio\VC98\INCLUDE\wchar.h(700) : error C2733:
> >second C linkage of overloaded function 'wmemchr' not allowed
> > ...

In your pycdc3_wrap.cxx file you need to move the

    #include <Python.h>

to be in front of

    #ifdef __cplusplus
    extern "C" {

You can make this change more permanent by editing pyexp.swg in SWIG's
library directory.

Robin Dunn
Software Craftsman
robin at     Java give you jitters?        Relax with wxPython!

Sent via
Before you buy.

More information about the Python-list mailing list