This is the mail archive of the cygwin@sourceware.cygnus.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Mingw/Link: Can't find "WinMain" in library.


Steve McAndrewSmith <steve@finagle.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@16").  But,
> if I link directly against the library objects, it works fine.

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

The -u _WinMain@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@sourceware.cygnus.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]