Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Message-ID: <007b01c25db5$6af24040$0219a8c0@eric2k>
From: ERIC KRAUSE (ekraus02) <ekraus02@baker.edu>
To: "Vince Mounts" <vince@mounts.cc>
Cc: <cygwin@cygwin.com>
References: <am4ssh$6t5$1@main.gmane.org>
Subject: Re: Problem building CVS version of binutils
Date: Mon, 16 Sep 2002 15:15:27 -0400
MIME-Version: 1.0
Content-Type: text/plain;
	charset="iso-8859-1"
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700

Vince Mounts writes:
> I received an error during the link stage of building the CVS version of
> binutils.
> Here is my setup:
>
> Fresh install of all the latest packages....
> gcc 3.2-1
> gcc-mingw 3.2-20020817-1
> gcc2 2.95.3-10
> binutils 20020706-2
>
> libintl 0.10.38-3
>
>
> Here is my error:
>
> gcc -W -Wall -Wstrict-prototypes -Wmissing-prototypes -g -O2 -o
cxxfilt.exe
> cplus-dem.o underscore.o  ../libiberty/libiberty.a ./../intl/libintl.a
>
/usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../libcygwin.a(libcmain.o)(.text+0
> x81): undefined reference to `_WinMain@16'
> collect2: ld returned 1 exit status
> make[3]: *** [cxxfilt.exe] Error 1
> make[3]: Leaving directory `/cygdrive/f/dev/binutils/build/binutils'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/cygdrive/f/dev/binutils/build/binutils'
> make[1]: *** [all-recursive-am] Error 2
> make[1]: Leaving directory `/cygdrive/f/dev/binutils/build/binutils'
> make: *** [all-binutils] Error 2

I've seen this kind of error before--none of the object files on the
cmd-line provides main(), so the linker finds the one in the system libs.
On Cygwin, this fallback main() calls a WinMain() function--but none of the
object files on the cmd-line provides a WinMain().  Since there is no
fallback WinMain (there has to be SOME way for execution flow to reach user
code) the linker flags the missing WinMain as an error.

I don't know why you're getting this error, but that's definitely what's
causing it.

---
Eric R. Krause


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

