Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Help w/standalone app creation using tcl2c

0 views
Skip to first unread message

cham...@eai.com

unread,
Jun 1, 1998, 3:00:00 AM6/1/98
to

Thanks to the graciousness of usenet, I can now compile my tcl applications as
"standalones" with tcl2c. My standalones don't behave right however. Here's a
sample test script.

button .hi -command exit -text "Hi mom"

When this is compiled in, and run, it puts the bitmap of the button (with Hi
mom) in the upper left corner of the screen, and an application window about
the right size on the screen, which has inside of it whatever was behind it on
the desktop. I can drag it around, but I can't click on it. I can't close it
(if I try to guess where the X is in the upper right corner it shows up but
doesn't cancel). So TK is hosed.

Another script that doesn't work is anything with a "puts". For instance

puts "Hi mom"

compiles, but when it executes, it returns a windows error saying it can't
find channel "file7", as if I had done

puts file7 "Hi mom"

So TCL is hosed too. What gives? Have *you* used tcl2c on Windows to make a
standalone app? How did it work? What am I doing wrong?

-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/ Now offering spam-free web-based newsreading

Bill Schongar

unread,
Jun 1, 1998, 3:00:00 AM6/1/98
to

cham...@eai.com wrote:
> Thanks to the graciousness of usenet, I can now compile my tcl
applications as
> "standalones" with tcl2c. My standalones don't behave right however.
Here's a
> sample test script.
>
> button .hi -command exit -text "Hi mom"

I added "pack .hi", then compiled, and it worked just fine. Did you forget
to include the -tk option on the tcl2c command line? I used:

tcl2c -o foo.c test.tcl -tk

> Another script that doesn't work is anything with a "puts". For instance

Try running your TCL script by associating .TCL files with WISH, and
you'll get the same error - there is no STDOUT (standard output) on Windows
without the console. When you're running your tests, you have the WISH
window as well as the console window, so you don't notice a problem.
Ditch all your 'puts' commands (or change them into message boxes)
before you compile your scripts..

-Bill

0 new messages