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

Hi, I'm new to Perl and learning while committing mistakes. I've installed strawberry perl v5.16.3 successfully and now getting error while installing Tk-804.027. What I'm doing is:

> perl Makefile.PL > dmake ...... ...... In file included from ../pTk/mTk/xlib/X11/Xlib.h:31:0, from ClientWin.c:30: ../pTk/mTk/xlib/X11/X.h:44:1: error: unknown type name '__int64' dmake: Error code 129, while making 'ClientWin.o' dmake: Error code 255, while making 'pTk\libpTk.a'
What can I do to resolve this issue?

Thanks in advance.
/ps2931

Replies are listed 'Best First'.
Re: Error while installing Tk on Window 7
by syphilis (Archbishop) on Jan 14, 2014 at 12:50 UTC
    ../pTk/mTk/xlib/X11/X.h:44:1: error: unknown type name '__int64'

    Current version of Tk on CPAN is 804.031 - and I think that version should build straight out of the box with Strawberry Perl. It certainly should *not* throw up *that* particular error.
    The 804.031 version of pTk/mTk/xlib/X11/X.h contains only one occurrence of "__int64":
    #if defined(_WIN64) && defined(_MSC_VER) typedef __int64 XID; #else typedef unsigned long XID; #endif
    If you really must have 804.027, you could try modifying its X.h along the same lines. It's the "&& defined(_MSC_VER)" that ensures that Strawberry's gcc compiler won't see the "__int64" symbol.

    Cheers,
    Rob

      I tried editing X.h but then got another error saying ../pTk/mTk/xlib/X11/Xlib.h:1206:35: ../pTk/tkIntXlibDecls.h: No such file or directory

      I found a Bug#13923 has been reported in past for the same. Now I've downloaded Tk-804.031_503 and installed it without any mess.

      And thanks for quick reply. It took me more time to type question than getting reply from you guys :)

      /ps2931
        One of the current causes of module installation error on Windows is the gcc version. If for example cygwin is installed on the box, the gcc used to compile will be the cygwin one (because cygwin dir is before strawberry one in PATH variable). after installing strawberry, modify the PATH variable to move strawberry directories first... and it works
Re: Error while installing Tk on Window 7
by marto (Cardinal) on Jan 14, 2014 at 12:42 UTC

    "getting error while installing Tk-804.027"

    This version is from 2007, subsequent releases have many changes relevant to you. When installing a module check the open bugs/issues and, if applicable changes made since the version you plan to install. I have Tk v804.031 installed on Strawberry Perl 5.16.2, Windows 7, and don't recall doing anything other than c:\cpan Tk. Try this and be patient as it runs through the test suite.