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

I'm using my own compilation of Perl 5.8 on Windows. I've been trying for days to compile the GD module. I haven't yet tried compiling the GD library myself that the GD module links with, as I've been using GNUWin32's GD, PNG, and ZLIB libraries that have already been built that I found at http://sourceforge.net/projects/gnuwin32/

I've tried various version of GD going back from the newest on down. And no luck. When it links, I get about five unresolved externals, eg. _gdFontSmall. I am using Microsoft tools to compile.

Has anyone ever compiled a working GD module for perl 5.8 on Windows? If so, I would be incredibly happy and grateful to hear some pointers from you! Thanks in advance.
  • Comment on Compiling GD on Win32 Perl 5.8 (non-ActiveState)

Replies are listed 'Best First'.
Re: Compiling GD on Win32 Perl 5.8 (non-ActiveState)
by traveler (Parson) on Jul 15, 2003 at 14:47 UTC
    I have not tried getting GD to run, but I have some information: I suspect that the GNUWin32 code was compiled with gcc. If you are using MS tools, it is unlikely to work. The rule with Win32 systems is, "You must use the same tools for everything." That said, there may be exceptions: I've heard of folks using gcc for some code, MSVC++ for some other code and the MS linker to glue it all together and it worked. I have also heard other folks say that does not work. Your best advice is to compile and link everything with the same tool.

    HTH, --traveler

Re: Compiling GD on Win32 Perl 5.8 (non-ActiveState)
by PodMaster (Abbot) on Jul 16, 2003 at 08:59 UTC
      Thank you both for the advice. I suspected I should try compiling all the libraries required by the GD module myself, and I will try that... UNLESS my perl is binary compatible with ActiveState's, and I can just take a pre-built GD module for Perl 5.8 from some perl repository. So that leads me to a trivial question: Is my Perl binary compatible with ActiveState's? Both are Perl 5.8, though I use the Perl source found on CPAN and not ActiveState's to build. I believe ActiveState also builds with Microsoft tools. I would guess we might be binary compatible? What do you think? I'll have to try.
        My guess would be that you are. Examine perl -V to be sure. The easiest way to see binary incompatibility is by comparing libs (as in perl -V:libs) and
            usethreads=undef use5005threads=undef useithreads=define usemultiplicity=define
            useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
            use64bitint=undef use64bitall=undef uselongdouble=undef
            usemymalloc=n, bincompat5005=undef
        
        I doubt you compiled with 64bits, without perlio, without ithreads or multiplicity ... That should generally cover it, but it's best to just try it out. It's also a good idea to run the test suite after downloading the PPM (to be really sure -- %90 success is good).

        There is very little difference between "activeperl" and the official perl release, well, there is nothing that would spontaneously cause binary incompatibility given similar compile conditions (ActiveState releases a patch for the official .... )

        MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
        I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
        ** The third rule of perl club is a statement of fact: pod is sexy.