delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/08/03/14:26:28

Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT sourceware DOT cygnus DOT com>
List-Archive: <http://sourceware.cygnus.com/ml/cygwin/>
List-Help: <mailto:cygwin-help AT sourceware DOT cygnus DOT com>,
<http://sourceware.cygnus.com/ml/#faqs>
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-Id: <199908031714.MAA09591@mercury.xraylith.wisc.edu>
To: Steve McAndrewSmith <steve AT finagle DOT org>
cc: Cygnus/Windows Mailing List <cygwin AT sourceware DOT cygnus DOT com>
Subject: Re: Mingw/Link: Can't find "WinMain" in library.
In-Reply-To: Your message of "Tue, 03 Aug 1999 11:15:32 PDT."
<37A731C4 DOT 2AFA21B9 AT finagle DOT org>
Date: Tue, 03 Aug 1999 12:14:44 -0500
From: Mumit Khan <khan AT xraylith DOT wisc DOT EDU>

Steve McAndrewSmith <steve AT finagle DOT org> writes:
> I've been trying to port (from MSVC) a handly little library (tkapp)
> which eases building Tcl/Tk Win32 apps.  It provides a WinMain function,
> and imports an AppInit() and a string of Tcl application script, and
> handles the messy init stuff.

This is certainly a bug, and we've talked about this before here with
no resolution as to what the right way to fix it is. I'll submit my
version of the patch soon, and let's see if that works or not.

> 
> However, when I try to link my little sample/test program against this
> library, it's unable to find WinMain (specifically, "WinMain AT 16").  But,
> if I link directly against the library objects, it works fine.

Here's a temporary workaround:
  
  $ gcc -Wl,-u,_WinMain AT 16 [ ... link stuff ... ]

The -u _WinMain AT 16 tells the linker to "undefine" that symbol so that it'll 
grab it out of the library.

Regards,
Mumit

--
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