This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Problem running a C/C++ program evaluating a tcl script
- To: cygwin@sourceware.cygnus.com
- Subject: Problem running a C/C++ program evaluating a tcl script
- From: Juergen Koehne <juergen.koehne@ulm.temic-semi.de>
- Date: Thu, 06 May 1999 17:31:19 +0200
- Organization: TEMIC Semiconductor GmbH
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@sourceware.cygnus.com