List Info

Thread: SWIG and ActivePerl 822




SWIG and ActivePerl 822
user name
2007-08-09 21:10:25
Hello,

I recently installed ActivePerl build 822 and discovered that my SWIG-based extensions no longer compile.  I am using Visual Studio .NET 2005 Enterprise and SWIG 1.3.31.

apk_wrap_perl_d.cxx(1232): error C2159: more than one storage class specified
apk_wrap_perl_d.cxx(1232): warning C4518: 'typedef ' : storage-class or type specifier(s) unexpected here; ignored
apk_wrap_perl_d.cxx(1232): warning C4502: 'linkage specification' requires use of keyword 'extern' and must precede all other specifiers

The error stems from this change in XSUB.h.  The following line:

#    define XS(name) void name(pTHX_ CV* cv)

Became:

  ; ifdef __cplusplus
#      define XS(name) extern "C" void name(pTHX_ CV* cv)
#    else
#      define XS(name) void name(pTHX_ CV* cv)
;   endif

It is the extern "C" that is causing Visual C++ to blow up, reverting back to the old definition of XS fixes the problem.

Regards,
Wade Brainerd
Technical Director
Activision


[1]

about | contact  Other archives ( Real Estate discussion Medical topics )