Problem running a C/C++ program evaluating a tcl script

Juergen Koehne
Thu May 6 08:31:00 GMT 1999

I've troubles running a C/C++ program evaluating a Tcl script. The
program compiles without errors, but when I run it only the Tcl prompt
appears on the command line but no window pops up.
Under Unix and Linux all works well. When I start the program the popup
window appears as expected.
Has anyone an idea what's going wrong?

Thanks in advance


I've appended a simple program and some system information.



#!/usr/local/bin/wish -f
button .b -text "Hello, world!" -command exit
pack .b


#include <tcl.h>
#include <tk.h>

int Tk_AppInit(Tcl_Interp *interp) {
  if (Tcl_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
  if (Tk_Init(interp) == TCL_ERROR) {
    return TCL_ERROR;
  Tcl_EvalFile(interp, "hello.tcl");
  return TCL_OK;

void main (int argc, char *argv[]) {
  Tk_Main(argc, argv ,Tk_AppInit);

bash-2.02$ g++ -o hello hello.C -ltcl80 -ltk80
bash-2.02$ hello

bash-2.02$ which wish
wish is /usr/local/bin/wish
bash-2.02$ ll /usr/local/bin/wish
lrw-r--r--   1 544      Domain U       74 May  6 15:16
/usr/local/bin/wish ->

bash-2.02$ uname -a
CYGWIN_NT-4.0 PC24 20.1 (0.3/1/1) 1998-12-3 20:39:18 i586 unknown

bash-2.02$ gcc -v
Reading specs from

gcc version egcs-2.91.57 19980901 (egcs-1.1 release)

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list