This is the mail archive of the
cygwin-xfree@cygwin.com
mailing list for the Cygwin XFree86 project.
X11, Tcl and Tk for Windows
- From: Mark Horn <mark dot horn at csiro dot au>
- To: cygwin-xfree at cygwin dot com
- Date: Thu, 18 Sep 2003 16:37:54 +1000
- Subject: X11, Tcl and Tk for Windows
- Reply-to: cygwin-xfree at cygwin dot com
I am looking for Tcl/Tk v8.0 and a compatible version of Xlib, for a port
of an application developed originally for a Unix platform. The application
is a based transport simulator, and is written in C++ . The Tcl/Tk is there
to provide the GUI, including a window within which X11 calls provide
"real-time" graphics display of the behaviour of simulated objects (eg
"real-time" movement of vehicles across a map).
At first sight Cygwin appears to provide what I need:
a. Include files for tcl and tk in usr/include and for X in X11R6/include/X11.
b. The X11 library at usr\X11R6\lib\libX11.a ... And the Tcl/Tk libraries
tcl80.lib and tk80.lib
But when I link with the libraries mentioned in (b), the following sequence
of code leads to failure in the X software. For brevity this code omits
checks on call results, which are OK up to the last line.
_pint = Tcl_CreateInterp();
Tcl_Init (_pint);
_tk_mainwin = Tk_MainWindow (_pint);
_pdisp= Tk_Display (_tk_mainwin);
int idc = DefaultColormap (_pdisp, 0); // Failure here, or in subsequent
call to XParseColor ()
I have also tried linking with libraries tcl84.lib , tk84.lib from the
Tcl/Tk distribution at http://www.tcl.tk/software/ includes .. but in that
case I get a failure in the call to Tcl_Init. I would appreciate advice on
how to obtain a workable collection of the software libraries, or on some
other way of overcoming these difficulties.
Mark Horn