This is the mail archive of the cygwin@cygwin.com 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]

Undefined reference to _WinMain@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@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@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/


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