Hi, I apologize if I've mailed to the wrong lists, but I'm not really sure what the problem is. I'm new to both XS and Perl on Windows. I've have a simple XS module that runs fine on Linux that allows me to access a C++ class method from perl. I wanted to use it on Windows, but after running perl Makefile.PL, when I run nmake I get these errors (I enclose a copy of my .xs file at the end of the mail):
C:\TEMP\test\James-Hello-0.01>nmake Microsoft (R) Program Maintenance Utility Version 6.00.8168.0 Copyright (C) Microsoft Corp 1988-1998. All rights reserved. cp hello.pl blib\lib\James\hello.pl cp Hello.pm blib\lib\James\Hello.pm cp hello2.pl blib\lib\James\hello2.pl E:\Perl\bin\perl.exe -IE:\Perl\lib -IE:\Perl\lib E:\Perl\lib\ExtUtils/xsubpp -C++ -typemap E:\Perl\lib\ExtUtils\typemap -typemap perlobject.map -typemap typemap Hello.xs > Hello.xsc && E:\Perl\bin\perl.exe -IE:\Perl\lib -IE:\Perl\lib -MExtUtils::Command -e mv Hello.xsc Hello.c Please specify prototyping behavior for Hello.xs (see perlxs manual) cl -c -nologo -O1 -MD -DNDEBUG -DWIN32 -D_CONSOLE -DNO_STRICT -DHAVE_DES_FC RYPT -DPERL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DPERL_MSVCRT_READFIX -O1 - MD -DNDEBUG -DVERSION=\"0.01\" -DXS_VERSION=\"0.01\" -IE:\Perl\lib\CORE Hello.c Hello.c Hello.xs(13) : error C2061: syntax error : identifier 'MyClass' Hello.xs(13) : error C2059: syntax error : ';' Hello.xs(13) : error C2449: found '{' at file scope (missing function header?) Hello.xs(18) : error C2059: syntax error : '}' Hello.c(53) : error C2065: 'MyClass' : undeclared identifier Hello.c(53) : error C2065: 'THIS' : undeclared identifier Hello.c(53) : warning C4552: '*' : operator has no effect; expected operator with side-effect Hello.c(56) : error C2059: syntax error : ')' Hello.c(62) : error C2065: 'delete' : undeclared identifier Hello.c(62) : error C2146: syntax error : missing ';' before identifier 'THIS' Hello.c(73) : warning C4552: '*' : operator has no effect; expected operator with side-effect Hello.c(76) : error C2059: syntax error : ')' Hello.c(82) : error C2223: left of '->sayHello' must point to struct/union Hello.c(97) : error C2065: 'XS_James__Hello_new' : undeclared identifier Hello.c(97) : warning C4047: 'function' : 'void (__cdecl *)(struct interpreter *,struct cv *)' differs in levels of indirection from 'int ' Hello.c(97) : warning C4024: 'Perl_newXS' : different types for formal and actual parameter 3 NMAKE : fatal error U1077: 'cl' : return code '0x2' Stop. I'm using ActivePerl 5.6.1.Build 631 and Visual C++ 6.0 I would appreciate any help or pointers towards existing resources - I've tried many google searches and looking through archives. Thanks in advance, James Here is a copy of my Hello.xs file : #ifdef _cplusplus extern "C" { #endif #include "EXTERN.h" #include "perl.h" #include "XSUB.h" #ifdef _cplusplus } #endif #include <iostream.h> class MyClass { public: void sayHello () { cout << "Hello, World!\n"; } }; MODULE = James::Hello PACKAGE = James::Hello MyClass * MyClass::new() void MyClass::DESTROY() void MyClass::sayHello() _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs