Win32::API install from CPAN shell

cosimo on 2006-12-23T17:53:00

The latest version of Win32::API, marked v0.46, should now correctly install even from the CPAN shell. Finally!



There is a fair amount of work behind, but now it should build, test and install cleanly on all major platform and compiler combinations.
In short, the build of API_test.dll is now gone. In the 0.46 package there's a pre-built library compiled with MSVC 6, that happens to work smoothly when loaded by any Win32::API flavour. The test suite is now simpler and takes compiler/environment differences into account.



I directly tested it on:

  • Source-compiled perl 5.8.8 + MSVC 6 + nmake
  • Source-compiled perl 5.8.8 + MSVC 2003 (Free toolkit) + nmake
  • Strawberry perl + MinGW GCC + GNU make
  • Strawberry perl + MinGW GCC + dmake
  • Cygwin perl + gcc + GNU make



Obviously there are lots of problems and improvements possible:



  • For example, it'd be great to investigate why gcc built the (now gone) test dll without all kernel32.lib imports...
  • Also, why functions with double or float return values always segfault when called.
  • And last but not least, callback interface works fully only under MSVC 6.



I don't know now when I'll find the time to go on with this work, but for now, have fun!