Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <12B9D9FD09E58547BBF7CEEE2DF1963B042C94C9@xch-se-02.se.nos.boeing.com> From: "EXT-Pennington, Dale K" To: "'cygwin AT cygwin DOT com'" Subject: Advance WinMain AT 16 Date: Thu, 11 Apr 2002 12:48:04 -0500 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Folks To forestall calls of RTFF (Read the Fabulous FAQ) and RTFM (Read the FAQ,Man) I should inform you that I have the Cygwin FAQ open to the pertinent question on my browser window even as I type this. I am attempting to get AutoGen to compile under Cygwin on a W2K machine. This package comes with a support library as well as the main executable. The support library initially failed to link due to the missing WinMain AT 16, so I read the FAQ. Following its suggestion, I added a dummy main to one of the source files of the support library. After this it built fine. But, when I attempted to build main application which uses the support library, I got the multiple definitions of main complaint and the link failed. I did check and the real main is in the linker command line before the library reference. I suspect that what really needed to be done with the support library was to create an additional source file with the dummy main, so it would be its own .o within the archive. Thus the linker would not try to grab it when building the main app, and no multiple definition complaint would occur. One note is that the support library is directly referenced (the .a explicitly named in the linker line) vs. using the -l option. My understanding of linkers is that this should not affect the linking, but I thought I should mention it. The purpose of this note is two-fold. The first is to see if some more experience Cygwin library builders could confirm my conjecture, before I munge with the makefiles to test this and pass it on to the package maintainer. The second is to suggest that if the first is true, the FAQ might want to be amended to make more clear what needs to be done in the library case. Thank you for your time. Dale Pennington -- 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/