SWIG and ActivePerl 822

--===============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

<span class="gmail_quote"></span>Hello,<br><br>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.<br><br>
apk_wrap_perl_d.cxx(1232): error C2159: more than one storage class specified
<br>apk_wrap_perl_d.cxx(1232): warning C4518: 'typedef ' : storage-class or type specifier(s) unexpected here; ignored<br>apk_wrap_perl_d.cxx(1232): warning C4502: 'linkage specification' requires use of keyword 'extern' and must precede all other specifiers
<br><br>The error stems from this change in XSUB.h.  The following line:<br><br>#    define XS(name) void name(pTHX_ CV* cv)<br><br>Became:<br><br>#    ifdef __cplusplus<br>#      define XS(name) extern "C" void name(pTHX_ CV* cv)
<br>#    else<br>#      define XS(name) void name(pTHX_ CV* cv)<br>#    endif<br><br>It is the extern "C" that is causing Visual C++ to blow up, reverting back to the old definition of XS fixes the problem.<br>
<br>
Regards,<br><span class="sg">Wade Brainerd<br>Technical Director<br>Activision<br><br><br>
</span>

------=_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 [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
--===============1678521771==--
Wade Brainerd [ Fr, 10 August 2007 04:10 ] [ ID #1792349 ]
Perl » gmane.comp.lang.perl.active-perl » SWIG and ActivePerl 822

Vorheriges Thema: Orphaned modules (was: compiling Inline::Ruby on win32)
Nächstes Thema: Compilation of Inline::Ruby on win32