ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> activeperl
activeperl
SWIG and ActivePerl 822
by Wade Brainerd other posts by this author
Aug 9 2007 7:11PM messages near this date
RE: ActivePerl 822 documentation problemette | Compilation of Inline::Ruby on win32
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved