Subject: Re: Problem building CVS version of binutils
From: ERIC KRAUSE (ekraus02) <[email-masked]>
To: "Vince Mounts" <[email-masked]>
Cc: <[email-masked]>
Date: Mon, 16 Sep 2002 15:15:27 -0400

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/