delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/19/04:41:53

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
Message-ID: <009701c3363d$1dd4dbe0$12760251@ximenes>
From: "Cliff Hones" <cliff AT aonix DOT co DOT uk>
To: <foomf AT attbi DOT com>, <cygwin AT cygwin DOT com>
References: <E19SuJv-00048l-00 AT mailgate DOT aonix DOT co DOT uk>
Subject: Re: Yet another undefined _WinMain16...
Date: Thu, 19 Jun 2003 09:31:00 +0100
Organization: Aonix Europe Ltd.
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165

foomf wrote:

> I just downloaded the CygWin package, including gcc (MynGW) because I had
been
> having no luck at all making MynGW work by itself on another machine.

> I have a simple app that defines static int main (int argc, char **argv)
{...}


Well, there's your problem then.  No good making main static, as then
it won't be exported so the system can't see it to call it.

> Using the command 'gcc -o testit testit.c' generates the usual message:
> /usr/lib/gcc-lib/i686-pc-cygwin/3.2/../../../libcygwin.a(libcmain.o
> (.text+0x7c): undefined reference to `_WinMain AT 16'
> collect2: ld returned 1 exit status
>
> The FAQ and the CygWin mailing list indicated that there might be some
> advantage to renaming /usr/lib/libm.a to /usr/lib/libm.a.16bit but that
had no
> effect.

That looks like bogus information.  Rename it back to its correct name.

> Since there's already a main() in the program, it looks as though some
> configuration file somewhere might be causing a problem, but I'm not sure
> where to look. If it helps, I did a gcc -v:
> $ gcc -v
> Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.2/specs
> Configured with: /netrel/src/gcc-3.2-3/configure --
>
enablelanguages=c,c++,f77,java --enable-libgcj --enable-threads=posix --with
-
>
system-zlib --enable-nls --without-included-gettext --enable-interpreter --
> disable-sjlj-exceptions --disable-version-specific-runtime-libs --enable-
>
shared --build=i686-pc-linux --host=i686-pc-cygwin --target=i686-pc-cygwin -
-
> enable-haifa --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --
> libdir=/usr/lib --includedir=/nonexistent/include --libexecdir=/usr/sbin
> Thread model: posix
> gcc version 3.2 20020927 (prerelease)
>
> I haven't found any generic makefiles or anything of that sort. Anyone got
a
> useful suggestion for a good place to look for the cause of this problem?

-- Cliff


--
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