delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2001/07/06/01:56:52

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT sources DOT redhat DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT sources DOT redhat DOT com>
List-Help: <mailto:cygwin-help AT sources DOT redhat DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT sources DOT redhat DOT com
Delivered-To: mailing list cygwin AT sources DOT redhat DOT com
Date: Thu, 5 Jul 2001 22:56:37 -0700 (PDT)
From: Mo DeJong <mdejong AT cygnus DOT com>
To: cygwin AT sources DOT redhat DOT com
Subject: Re: Problem choosing exe entry point.
In-Reply-To: <Pine.HPP.3.96.1010706002321.27159D-100000@hp2.xraylith.wisc.edu>
Message-ID: <Pine.SOL.3.91.1010705224456.2695E-100000@cse.cygnus.com>
MIME-Version: 1.0

On Fri, 6 Jul 2001, Mumit Khan wrote:

> On Thu, 5 Jul 2001, Mo DeJong wrote:
> 
> > I think I have found a problem with the way Cygwin ld
> > picks the executable entry point when both WinMain() and main()
> > are available. I would think that passing in the -mwindows flag
> > (which gets passed to ld as --subsystem windows) would clear
> > things up and link with WinMain(). Instead, Cygwin ld is
> > choosing main().
> 
> I would consider this a quality of implementation issue rather
> than a bug. Having both main and WinMain is rather ambiguous
> under most circumstances, and I'm not sure I'd qualify this as
> a bug.

Well, then how does one clear up the ambiguous set of symbols?
I would have thought passing (the default) -mconsole or -mwindows
would take care of that.

> Mo, do you have any reason to have both, or do you have a project
> that defines both?

I am trying to get an existing source base (Tcl/Tk -> tk/win/winMain.c)
working the same way with VC++ and gcc. The generated wish executable
acts differently when called via main() vs WinMain().

I agree that this is an edge case, but it seems wrong to me.
If folks don't agree that it is a bug then I will just add
the -e flag to Tcl/Tk's configure script and be done with it.
If folks agree that it is a bug worth fixing, then I will
write up an autoconf macro that checks for this case so
things will work with the -e flag once fixed.

cheers
Mo

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


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