Failed to build tcl8.1

Thomas Kowatsch
Tue Aug 31 23:49:00 GMT 1999

Earnie Boyd wrote:

> --- Thomas Kowatsch <> wrote:
> -8<-
> > Ok this was obviously the wrong approach linking with -ltcl81 and stub
> > lib together and was the reason for the core to happen. I now can run
> > it ok.
> >
> > But a another little problem occured. There is no console input after
> > I started wish81.exe. When I start the cygwish80.exe coming with
> > b20.1 a console window pops up. I examined code again and found the
> > problem to be in tk8.1/win/winMain.c. There are two entry points in
> > there, one is main() and the other is WinMain(). If main() is called
> > (what is obviously done by cygwin) then before Tk_Main() is called
> > a variable consoleRequired is set to FALSE. If I start wish81.exe in
> > gdb and set this variable to TRUE before call to Tk_Main() a
> > console window pops up. In WinMain() the consoleRequired is TRUE
> > before call to Tk_Main(). My question is now, what to do:
> >
> > 1.) change code in main() for cygwin to set consoleRequired to TRUE
> > 2.) Find a possibility to get WinMain be called (Any advise)
> >
> > Can anybody help me on this?
> If you add the -mwindows switch to the link step the WinMain function would be
> called upon startup instead of the main function.

I rechecked the link line, and it has the -mwindows switch:

gcc  -o wish81.exe   -mwindows winMain.o wish.res.o \
         ../../tcl8.1/win/./libtcl81.a libtk81.a \
          -luser32 -lcomdlg32 -lgdi32 -lwinspool

/ld: warning: cannot find entry symbol _WinMainCRTStartup; defaulting to 00401000

Rechecked with gdb:

gdb ./wish81.exe
GNU gdb 4.17.1
Copyright 1998 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i586-cygwin32"...
(gdb) b main
Breakpoint 1 at 0x401377: file ../win/winMain.c, line 349.
(gdb) b WinMain
Breakpoint 2 at 0x401059: file ../win/winMain.c, line 83.
(gdb) r
Starting program: /tmp/tcl/bin/./wish81.exe

[failed reading symbols from DLL]
"/c/WINNT/system32/ADVAPI32.DLL": error reading line numbers

[failed reading symbols from DLL]
"/c/WINNT/system32/KERNEL32.dll": error reading line numbers


Breakpoint 1, main (argc=1, argv=0xa0310b8) at ../win/winMain.c:349
349         Tcl_SetPanicProc(WishPanic);

Any ideas?


Thomas Kowatsch                      | - Senior Software Engineer -
Switching Test Solutions AG          | mailto:
Wavetek Wandel & Goltermann Divison5 | web   :
Friesenbergstr. 75                   | Phone : +41 1 454-6731
CH-8055 Zuerich                      | FAX   : +41 1 454-6612

Want to unsubscribe from this list?
Send a message to

More information about the Cygwin mailing list