delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/12/17/20:15:28

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
X-Originating-IP: [209.63.5.185]
X-Originating-Email: [roy_clemmons AT hotmail DOT com]
X-Sender: roy_clemmons AT hotmail DOT com
From: "Roy Clemmons" <roy_clemmons AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Subject: Re: Undefined reference to _WinMain AT 16
Date: Wed, 17 Dec 2003 19:15:43 -0600
MIME-Version: 1.0
Message-ID: <Law12-OE56fQ15AbAqe0000d292@hotmail.com>
X-OriginalArrivalTime: 18 Dec 2003 01:15:11.0468 (UTC) FILETIME=[6234E2C0:01C3C504]

I fixed this problem by adding a dummy winmain to xmlparse.c

int __declspec(nothrow) __stdcall WinMain(int a, int b, char* c, int
d);
int __declspec(nothrow) __stdcall WinMain(int a, int b, char* c, int
d)
{
    return 0;
}

Don't know the repercussions - if any.

Roy


----- Original Message ----- 
From: "Roy Clemmons" <roy_clemmons AT hotmail DOT com>
To: <cygwin AT cygwin DOT com>
Sent: Wednesday, December 17, 2003 3:22 PM
Subject: Undefined reference to _WinMain AT 16


> Greetings,
>
> After downloading expat-1.95.7.tar.gz from SourceForge and executing
> ./configure (per the README, however I did not
> execute./buildconf.sh ), I am receiving the following error when
> attempting to make the expat library under the cygwin 1.5.5-1
> environment:
>
> undefined reference to `_WinMain AT 16'
>
> The same error reported to the cygwin email list resulted in a reply
> that suggested that this error might be caused because of a missing
> main() in the source code.
>
> My OS is Windows 2000 SP 4
>
> What can I do to resolve this issue?
>
> Thank you,
>
> Roy Clemmons
>
> ===================================
>
> Here is the complete make output:
>
> $ make
> /bin/bash ./libtool --silent --mode=compile
> gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototype
> s -fexceptions -DHAVE_EXPAT_CONFIG_H   -I./lib -I. -o
> lib/xmlparse.lo -c lib/xmlparse.c
> /bin/bash ./libtool --silent --mode=compile
> gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototype
> s -fexceptions -DHAVE_EXPAT_CONFIG_H   -I./lib -I. -o
lib/xmltok.lo -c
> lib/xmltok.c
> /bin/bash ./libtool --silent --mode=compile
> gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototype
> s -fexceptions -DHAVE_EXPAT_CONFIG_H   -I./lib -I. -o
> lib/xmlrole.lo -c lib/xmlrole.c
> /bin/bash ./libtool --silent --mode=link
> gcc -g -O2 -Wall -Wmissing-prototypes -Wstrict-prototypes -
>
fexceptions -DHAVE_EXPAT_CONFIG_H   -I./lib -I. -no-undefined -version
> -info 5:0:5 -rpath /usr/local/
> lib  -o libexpat.la lib/xmlparse.lo lib/xmltok.lo lib/xmlrole.lo
>
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../libcygwin.a(libcmain.o)
> (.text+0x7c): undefined reference to `_WinMain AT 16'
> collect2: ld returned 1 exit status
> make: *** [libexpat.la] Error 1
>
> Here is the complete ./configure output:
>
> $ ./configure
> checking build system type... i686-pc-cygwin
> checking host system type... i686-pc-cygwin
> checking for gcc... gcc
> checking for C compiler default output... a.exe
> checking whether the C compiler works... yes
> checking whether we are cross compiling... no
> checking for suffix of executables... .exe
> checking for suffix of object files... o
> checking whether we are using the GNU C compiler... yes
> checking whether gcc accepts -g... yes
> checking for ld used by GCC... /usr/i686-pc-cygwin/bin/ld.exe
> checking if the linker (/usr/i686-pc-cygwin/bin/ld.exe) is GNU ld...
> yes
> checking for /usr/i686-pc-cygwin/bin/ld.exe option to reload object
> files... -r
> checking for BSD-compatible nm... /usr/bin/nm -B
> checking whether ln -s works... yes
> checking how to recognise dependant libraries... file_magic file
> format pei*-i386(.*architecture: i
> 86)?
> checking command to parse /usr/bin/nm -B output... ok
> checking how to run the C preprocessor... gcc -E
> checking for ANSI C header files... yes
> checking for sys/types.h... yes
> checking for sys/stat.h... yes
> checking for stdlib.h... yes
> checking for string.h... yes
> checking for memory.h... yes
> checking for strings.h... yes
> checking for inttypes.h... yes
> checking for stdint.h... yes
> checking for unistd.h... yes
> checking dlfcn.h usability... yes
> checking dlfcn.h presence... yes
> checking for dlfcn.h... yes
> checking for ranlib... ranlib
> checking for strip... strip
> checking for objdir... .libs
> checking for gcc option to produce PIC... -DDLL_EXPORT
> checking if gcc PIC flag -DDLL_EXPORT works... yes
> checking if gcc static flag -static works... yes
> checking if gcc supports -c -o file.o... yes
> checking if gcc supports -c -o file.lo... yes
> checking if gcc supports -fno-rtti -fno-exceptions... yes
> checking whether the linker (/usr/i686-pc-cygwin/bin/ld.exe)
supports
> shared libraries... yes
> checking how to hardcode library paths into programs... immediate
> checking whether stripping libraries is possible... yes
> checking dynamic linker characteristics... Win32 ld.exe
> checking if libtool supports shared libraries... yes
> checking whether to build shared libraries... yes
> checking whether to build static libraries... yes
> creating libtool
> checking for gcc... (cached) gcc
> checking whether we are using the GNU C compiler... (cached) yes
> checking whether gcc accepts -g... (cached) yes
> checking for a BSD-compatible install... /usr/bin/install -c
> checking whether gcc accepts -fexceptions... yes
> checking for ANSI C header files... (cached) yes
> checking whether byte ordering is bigendian... no
> checking for gcc option to accept ANSI C... none needed
> checking for an ANSI C-conforming const... yes
> checking for size_t... yes
> checking for memmove... yes
> checking for bcopy... yes
> checking fcntl.h usability... yes
> checking fcntl.h presence... yes
> checking for fcntl.h... yes
> checking for unistd.h... (cached) yes
> checking for off_t... yes
> checking for stdlib.h... (cached) yes
> checking for unistd.h... (cached) yes
> checking for getpagesize... yes
> checking for working mmap... no
> checking check.h usability... no
> checking check.h presence... no
> checking for check.h... no
> configure: creating ./config.status
> config.status: creating Makefile
> config.status: creating expat_config.h
>

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019