SWIG and ActivePerl 822

SWIG and ActivePerl 822

am 10.08.2007 04:10:25 von Wade Brainerd

--===============1678521771==
Content-Type: multipart/alternative;
boundary="----=_Part_8640_365074.1186711825571"

------=_Part_8640_365074.1186711825571
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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

------=_Part_8640_365074.1186711825571
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

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





------=_Part_8640_365074.1186711825571--

--===============1678521771==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
ActivePerl mailing list
ActivePerl@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1678521771==--