delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/05/06/11:32:10

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <3731B5C5.57BF7276@ulm.temic-semi.de>
Date: Thu, 06 May 1999 17:31:19 +0200
From: Juergen Koehne <juergen DOT koehne AT ulm DOT temic-semi DOT de>
Organization: TEMIC Semiconductor GmbH
X-Mailer: Mozilla 4.51 [en] (WinNT; I)
X-Accept-Language: en,de
Mime-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Problem running a C/C++ program evaluating a tcl script

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

Juergen


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

-----------------------------------------------------------------------------------

hello.tcl:

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


hello.c:

#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);
  exit;
}



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 ->
//x/Programme/cygwin32/cygwin-b20/H-i586-cygwin32/bin/cygwish80*

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
x:\Programme\cygwin32\cygwin-b20\H-i586-cygwin32\bin\..\lib\gcc-lib\i586-cygwin32\egcs-2.91.57\specs

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



--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019