delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/26/09:55:20

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Subscribe: <mailto:cygwin-subscribe AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sourceware DOT cygnus DOT com>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <37C5458E.F0A0E1C0@stest.ch>
Date: Thu, 26 Aug 1999 15:47:58 +0200
From: Thomas Kowatsch <Thomas DOT Kowatsch AT stest DOT ch>
Organization: Switching Test Solutions AG
X-Mailer: Mozilla 4.04 [en] (X11; U; SunOS 5.5.1 sun4u)
MIME-Version: 1.0
To: Cygwin List <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Failed to build tcl8.1
References: <19990826122436 DOT 26112 DOT rocketmail AT web110 DOT yahoomail DOT com>

Earnie Boyd wrote:

> --- Thomas Kowatsch <Thomas DOT Kowatsch AT stest DOT ch> 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
/usr/local/cygnus/cygwin-b20/usr/bin/../lib/gcc-lib/i586-cygwin32/2.95/../../../../i586-cygwin32/bin

/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
6d500000:/tmp/tcl/bin/tcl81.dll

[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

77e70000:/c/WINNT/system32/USER32.dll
77ed0000:/c/WINNT/system32/GDI32.dll
77e10000:/c/WINNT/system32/RPCRT4.dll
61000000:/usr/local/cygnus/cygwin-b20/usr/bin/cygwin1.dll
642c0000:/tmp/tcl/bin/tk81.dll
77d80000:/c/WINNT/system32/COMDLG32.DLL
77c40000:/c/WINNT/system32/SHELL32.dll
71030000:/c/WINNT/system32/COMCTL32.dll
5f810000:/c/WINNT/System32/rpcltc1.dll

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

Any ideas?

Cheers,
Tommy

--
------------------------------------------------------------------------
Thomas Kowatsch                      | - Senior Software Engineer -
Switching Test Solutions AG          | mailto: thomas DOT kowatsch AT stest DOT ch
Wavetek Wandel & Goltermann Divison5 | web   : http://www.stest.com
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 cygwin-unsubscribe AT sourceware DOT cygnus DOT com

- Raw text -


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