On Fri, Jan 21, 2005 at 10:41:52AM +0100, Reinhard Pagitsch wrote: > I try to use C++ code in my perl XS module, but allways I get the following > errors from cl: > > Prop.c(49) : warning C4518: 'void ' : storage-class or type specifier(s) > unexpected here; ignored > Prop.c(49) : error C2059: syntax error : ';' > Prop.c(54) : error C2513: 'void' : no variable declared before '=' > Prop.c(60) : error C2062: type 'void' unexpected > Prop.c(72) : warning C4518: 'void ' : storage-class or type specifier(s) > unexpected here; ignored > Prop.c(72) : error C2059: syntax error : ';' > Prop.c(75) : error C2513: 'void' : no variable declared before '=' > Prop.c(81) : error C2062: type 'void' unexpected > NMAKE : fatal error U1077: 'cl' : return code '0x2' > > The code in the prop.c where the error is looks > XS(XS_Win32__File__Prop_ReadProperty) > { > dXSARGS; > if (items != 1) > Perl_croak(aTHX_ "Usage: Win32::File::Prop::ReadProperty(THIS)"); > { > Properties * THIS; // This generates the error
I suggest using a different variable name. THIS has a special meaning. See perldoc perlxs, "Using XS With C++". -- Paul Johnson - [EMAIL PROTECTED] http://www.pjcj.net