Hello PerlWin32Users List,

I am trying to compile the Perl 5 module Win32::API
(http://dada.perl.it/) on WinNT4 sp6 using MinGW - gcc-2.95.2.1 and
having a rough go of it with the xs code. The compilation fails
because this code has an undeclared identifier: 

--- console output, watch for wrapping --

  Reading L:/develperl/site/lib/Make.pm
  Reading L:\develperl\usr\manual_build\Win32-API-0.20\makefile
  gcc -c  -g -O2 -DWIN32 -fno-strict-aliasing -DPERL_MSVCRT_READFIX -
DPERL_POLLUTE  -g -O2 -DVERSION=\"0.20\" -DXS_VERSION=\"0.20\"  -
I..\..\..\lib\CORE API.c
  API.xs: In function `AbstractCallback':
  API.xs:52: `_asm' undeclared (first use in this function)
  API.xs:52: (Each undeclared identifier is reported only once
  API.xs:52: for each function it appears in.)
  API.xs:52: parse error before `{'
  API.xs: At top level:
  API.xs:56: parse error before string constant
  API.xs:56: warning: data definition has no type or storage class
  API.xs: In function `XS_Win32__API_Call':
  API.xs:282: `_asm' undeclared (first use in this function)
  API.xs:282: parse error before `{'
  API.xs:290: parse error before `{'
  API.xs:298: parse error before `{'
  API.xs:306: parse error before `{'
  API.xs:316: parse error before `{'
  API.xs:326: parse error before `{'
  API.xs:342: parse error before `{'
  API.xs:351: parse error before `{'
  Code 256 from gcc -c -g -O2 -DWIN32 -fno-strict-aliasing -
DPERL_MSVCRT_READFIX -DPERL_POLLUTE -DVERSION=\"0.20\" -DXS_VERSION=\"0.20\" -
I..\..\..\lib\CORE API.c 
at L:/develperl/site/l  ib/Make.pm line 265.

--- code snippet quote w/ line nos., watch for wrapping --
# from Win32-API-0.20/API.xs

48
49  void AbstractCallback() {
50
51    LPBYTE self;
52    _asm {
53            pop             eax
54            mov     dword ptr self, eax
55    }
56    printf("AbstractCallback: got eax=%ld\n", self);
57  }
58
---  end code snippet quote  ------------------------------

So, this _asm critter seems to be the first problem to tackle. I think the 
possibility exists that some #define isn't happening, that needs to, and maybe 
it's one that the MSVC would do by default (but not MinGW). The author of this 
module, Aldo 'dada' Calpini, uses MSVC++ to build his binaries. Nobody that I 
know of has built this mod using something else. Anybody here done so?

Or: anybody (perhaps familiar with xs and Win32/MSVC++) got any 
insights?

   Thanks Much,
      soren andersen

P.S.  BTW -- I just built Win32::Clipboard to this Perl using the build 
environment being described above, and I found a bit of a showstopper in 
dada's source files that I fixed. Anybody wanna know about it?

_______________________________________________
Perl-Win32-Users mailing list
[EMAIL PROTECTED]
http://listserv.ActiveState.com/mailman/listinfo/perl-win32-users

Reply via email to