This is the mail archive of the 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]
Other format: [Raw text]

Re: Problem building CVS version of binutils

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
> cplus-dem.o underscore.o  ../libiberty/libiberty.a ./../intl/libintl.a
> 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:
Bug reporting:

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