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.
Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

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


Juergen Koehne <juergen.koehne@ulm.temic-semi.de> writes:
> 
> 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?
> 

Short and pat answer -- you're doing it correctly ;-)

This has come up in the past and answer hasn't changed -- Unix and Cygwin
ports of Tcl are not the same (unless you build Cygwin Tcl as a Unix one,
which is not the case in the Cygwin distribution)!

Two choices:

- For truly portable Tcl code, you should use dynamic loading, and nothing
  but dynamic loading. It's simple and it works.

- If you really must have a "main" function and create all the
  interpreters yourself as you're doing, then you need different "main"
  programs for Unix and Windows32. Tcl folks have some examples to show
  how this is done, and you should look at the example.zip or
  example.tar.gz somewhere on Scriptics site.

Also, check the FAQ, which might have some more pertinent information.

Regards,
Mumit


--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com