Hi,

> I am trying to install Win32-GUI-DIBitmap. At first I install ppm, but
> when I tryed to run demo.pl sample script I got a error:
>
> Can't call method "ConvertToBitmap" on an undefined value at
D:\IPSwitch\test\de
> mo.pl line 14.

Your PPM install is probably good because you can load Win32::GUI::DIBitmap.

I think problem come from how you run demo.pl script.
This script don't work if current directory isn't samples directory.
Because it try to load a bitmap in bmp subdirectory using a relative path.
If you aren't in samples directory, Win32::GUI::DIBitmp new methods return
undef. So, ConvertToBitmap don't work because $dib is undef.

>
> then I tryed to install this module from scratch, how it wrotten in
> Readme.txt :
>
> SP> INSTALLATION
> SP>
> SP> Download FreeImage source code at http://freeimage.sourceforge.net/
> SP> Build the FreeImage static lib with MSVC project.
> SP> Copy the FreeImage.lib and FreeImage.h in the extlib directory.
>
> Instead I am copied FreeImage\Dist\FreeImage.lib in extlib directory.
> Is it the same file???

You need Visual C++ for build from source because DIBitmap isn't a pure perl
module. It's build a special perl dll from C source code (like Win32::GUI).

You must build source with FreeImage Static lib Project with MSVC.
Generaly, static lib can be found in FreeImage\Source\FreeImageLib\Release
directory.

You probably use import library for FreeImage.dll.
I don't know if it work using extrenal freeImage.dll.

>
> SP> To install this module type the following:
> SP>
> SP>    perl Makefile.PL
> .....
> Writing Makefile for Win32::GUI::DIBitmap

Look good here ;)

> SP>    make        # nmake
> Searching EXE: E:/WINDOWS/EXE/NMAKE.EXE
>   Inflating: NMAKE.ERR
>   Inflating: NMAKE.EXE
> PKSFX: (W18) Warning! README.TXT already exists.  Overwrite (y/n)?y
>   Inflating: README.TXT

Strange ??
It's look like a auto-extractable exe file.
nmake command it's for build module in current directory.

> SP>    make install    # nmake install
> .....
> Der Befehl "cl" ist entweder falsch geschrieben oder   # from German:
> konnte nicht gefunden werden.                          # cl not found
>
> NMAKE : fatal error U1077: 'C:\WINDOWS\system32\cmd.exe' : return code
'0x1'
> Stop.
>
> Have I to have a linker programm too?
>

You must have Visual C++ and have Visual C++ bin directory in your path.
Generaly, you can run a VCVARS32.bat file from Visual C++ bin directory for
setup environement.

If you don't have Visual C++, it's possible to build compatible ActivePerl
extention using MinGW (free).
Look, to my web page for an howto with MinGW and Win32::GUI.
http://perso.club-internet.fr/rocherl/HowTo/howto-mingw.html
I never test to build DIBitmap with MinGW.

Laurent.


Reply via email to