swarm-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[swarm-hackers] building Tcl, Tk and BLT for 64 bit Windows


From: Marcus G. Daniels
Subject: [swarm-hackers] building Tcl, Tk and BLT for 64 bit Windows
Date: Sun, 18 Apr 2010 14:18:09 -0600
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4

Hi,

Some notes on building Tcl, Tk, and BLT for 64 bit Windows. (Hard enough won that I thought it was worth writing down..)

First, to provide support for the structured exception handling used by Tcl &Tk, which doesn't have 64 bit support in the non-Microsoft #ifdefs, it's necessary to get the 2003 R2 Platform SDK Web Install. It's a no-cost download.

http://www.microsoft.com/downloads/details.aspx?FamilyID=0baf2b35-c656-4969-ace8-e4c0c0716adb&displaylang=en

I've attached the scripts I use to build. Non-obvious things here are 1) the need to force use of the SDK 64 bit compiler and its headers. Tcl & Tk have autoconf logic that look for the 2003 version (the current Windows 7 SDK for 3.5 does not work). The script ensures these resources are used earlier in autoconf tests. Also, note 2) The use of `short' pathnames to sneak through paths with spaces that would otherwise befuddle the autoconf scripts due to whitespace non-quoting issues.

I found it's easier to build BLT with the MingW64 cross compiler on Linux -- the BLT Makefiles for Microsoft tools are bit-rotty. Here I specify --host=x86_64-w64-mingw32 as an argument configure and first export the environment variables RANLIB=x86_64-w64-mingw32-ranlib and CC=x86_64-w64-mingw32-gcc. Before running BLT configure I installed the Tcl/Tk with the Microsoft compilers to a subdirectory that was shared with the one used in the Linux environment (a Virtualbox shared folder), and use --with-tcl and --with-tk to point the lib/ subdirectory in this install.

This is the only BLT patch I have needed to get the BLT demos to work on my 64 bit Windows 7 machine.

In blt2.4z/win/X11/X.h add the first clause:

#ifdef WIN64
typedef __int64 XID;
#else
typedef unsigned long XID;
#endif

I am using the BLT SRPM for Fedora (12), which tracks Tcl/Tk 8.5 whereas the last official source release does not. Also it has some bug fixes.

Marcus

Attachment: build-tcl
Description: Text document

Attachment: build-tk
Description: Text document


reply via email to

[Prev in Thread] Current Thread [Next in Thread]