Ramzai has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone! The problem:

I have installed Win32::API from CPAN
But even
use Win32::API; print 'Hi';
>> Can't locate loadable object for module Win32::API in
@INC (@INC contains: F:/Perl/lib F:/Perl/site/lib .) at ...
Compilation failed in require at ...
BEGIN failed--compilation aborted at ...


Tried to execute the module itself, but after
<49> bootstrap Win32::API;
>> Can't locate loadable object for module Win32::API in
@INC (@INC contains: F:\Perl\site\lib\Win32\
F:/Perl/lib F:/Perl/site/lib .) at ...
DynaLoader::croak('Can\'t locate loadable object for module Win32::API in @INC (@IN...') called at ...
DynaLoader::bootstrap('Win32::API') called at ...


What is wrong?
1)I'm wrong 2)Win32::API 3)DynaLoader::bootstrap?

Thanks for any responses

Replies are listed 'Best First'.
Re: Problems with Win32::API
by bart (Canon) on Nov 05, 2003 at 07:48 UTC
    Off CPAN? Bad. Judging by your error messages, the module isn't properly installed, you seem to be missing the DLL. You best install a precompiled binary distribution. It's the only way to make it work if you don't have the proper C compiler; for ActivePerl (and compatibles) that's MS Visual C.

    Like Roger said, for Activeperl, PPM is the way to go. If you don't have direct internet access, you can download the latest precompiled versions here:

    Both archives contain all the files you need to install this module, complete with DLL, without any internet connection. Just decompress the .zip file, preserving the folder structure, and run PPM from the directory you decompressed it into — you don't need to decompress the .tar.gz file, PPM does it by itself. You may use this command line at the DOS prompt:
    PPM install Win32::API

    You may delete the decompressed files again after installation.

      Thank you very much
Re: Problems with Win32::API
by Roger (Parson) on Nov 05, 2003 at 06:09 UTC
    Perhaps you should tell us how you installed the Win32::API module. Did you use the ppm to install a pre-compiled distribution, or did you download the source and then compiled it yourself?