Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

david.romano (6556)

david.romano
  (email not shown publicly)
AOL IM: imdavidromano (Add Buddy, Send Message)

Journal of david.romano (6556)

Thursday October 05, 2006
06:16 AM

Installing GD and Tk w/Strawberry Perl

[ #31222 ]

I decided to try to use Strawberry Perl after working on a small project for my former college's residence life office. The software needs to run on Windows, and developing it I've been using GD.pm and Tk.pm among other modules (developing on my iBook, at first). Anyway, I wanted to see how well it would do the deed on Windows. Installing Strawberry Perl went without a hitch. Installing Tk.pm worked with the hints provided by Dean Brockhausen (For the first bug, I found it easier to change the relative path instead of copying files around). GD.pm, on the other hand, took up a lot more time.

First, I installed the GD library from the GnuWin32 project. I kept the default installation to C:\Program Files\GnuWin32. When installing GD.pm with cpan, I typed look GD. I had to change some stuff around with the how GD is built. During perl Makefike.PL I was asked "Where is libgd installed?" to which I answered "C:/Progra~1/GnuWin32". Then I edited the Makefile, changing:

    $(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp
    dlltool --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
    $(LD) -o $@ $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) dll.exp

to:

    $(LD) -o $@ -Wl,--base-file -Wl,dll.base $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) C:\Progra~1\GnuWin32\lib\libgd.dll.a dll.exp
    dlltool --def $(EXPORT_LIST) --base-file dll.base --output-exp dll.exp
    $(LD) -o $@ $(LDDLFLAGS) $(LDFROM) $(OTHERLDFLAGS) $(MYEXTLIB) $(PERL_ARCHIVE) $(LDLOADLIBS) C:\Progra~1\GnuWin32\lib\libgd.dll.a dll.exp

With those changes, GD.pm built successfully.

When running dmake test, there were more problems. perl.exe complained that it couldn't find libgd2.dll. A quick search under C:\Program Files turned it up at C:\Program Files\GnuWin32\bin\libgd2.dll. So I set the following environment variables to make the tests pass:

C:\whatever>set LIB=%LIB%;C:\Program Files\GnuWin32\bin;C:\Program Files\GnuWin32\lib;
C:\whatever>set PATH=%PATH%;C:\Program Files\GnuWin32\bin;C:\Program Files\GnuWin32\lib;

To make sure I wouldn't have problems in the future, I went to Control Panel->System->Advanced->Environment Variables->System Variables and changed those variables permanently to include the GnuWin32 paths.

GD ticket filed (basically a duplicate of this journal entry's GD portion)

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.