[Mono-list] problem building pedump on cygwin - WinMain@16

Dietmar Maurer dietmar@ximian.com
Wed, 12 Sep 2001 09:56:07 +0200

Nick Drochak wrote:

> All,
> I STFW'd and even RTFCode, but I can't figure out why make complains on pedump.  The solution for other systems was to check there is a main() function defined, which there is.  Also someone suggested '-mno-cgywin' which I tried, but didn't help.
> Here is the pertinent output from make in mono:
> Making all in metadata
> make[3]: Entering directory `/home/Administrator/mono/mono/metadata'
> /bin/sh ../../libtool --mode=link gcc  -g -Wall -Wunused -Wmissing-prototypes -W
> missing-declarations   -o pedump.exe   -L/usr/local/lib -lglib -L/usr/local/lib
> -lgmodule -lglib

There are no files to link in the above gcc call, so there is also no main function.

> gcc -g -Wall -Wunused -Wmissing-prototypes -Wmissing-declarations -o pedump.exe
>  -L/usr/local/lib /usr/local/lib/libgmodule.a /usr/local/lib/libglib.a
> /usr/lib/libcygwin.a(libcmain.o)(.text+0x6a):libcmain.c: undefined reference to
> `WinMain@16'
> collect2: ld returned 1 exit status
> make[3]: *** [pedump.exe] Error 1
> make[3]: Leaving directory `/home/Administrator/mono/mono/metadata'
> make[2]: *** [all-recursive] Error 1
> make[2]: Leaving directory `/home/Administrator/mono/mono'
> make[1]: *** [all-recursive] Error 1
> make[1]: Leaving directory `/home/Administrator/mono'
> make: *** [all] Error 2

Strange - which version of automake/autoconf do you use (autoconf --version)?

- Dietmar