delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/19/18:50:20

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: <01c801c336b3$30749b20$12760251@ximenes>
From: "Cliff Hones" <cliff AT aonix DOT co DOT uk>
To: <foomf AT attbi DOT com>, <cygwin AT cygwin DOT com>
References: <E19T7iR-0008EP-00 AT mailgate DOT aonix DOT co DOT uk>
Subject: Re: Yet another undefined _WinMain16...
Date: Thu, 19 Jun 2003 23:35:58 +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

> Actually, I didn't remove the static because I hadn't seen your message
yet.
> Email propagation messes us up.

> I'm not sure what other info I could give that would be useful, short of
the
> code itself.

Wow - what a novel idea!  If it's not too large, that's just the ticket.
By the way, have you succeeded in building a simple "hello world" yet?
If not, that would not be too large to show.

> I've renamed libm.a to its proper name. I've removed the static
> declaration, changed it from main to WinMain, and compiled with and
without --
> shared to see if there was any effect, in each combination.

Read carefully.  I didn't say rename main to winmain, so why on earth
did you do that?

> There is no change to the way it behaves - I either get the undefined
> reference, without --shared,  or the file generated is not a windows
> executable, with --shared; neither is a useful result.

If you don't have a (non-static) main, you will get the error you see.
Compiling with --shared is *asking* the system to build you a dll, so
of course that's what you get.

> I'm hoping this is something fairly common

Yes, it is unfortunately fairly common for people to think they might
know what's wrong, blame it on all sorts of irrelevant things, fail
to read mail, and fail to read details of how to submit coherent bug
reports.  Join the club.

>... that just isn't quite covered by
> the FAQ, and someone can point me to the FM or equivalent, so I can stop
> asking stupid newbie questions.

Try removing "static" but calling it "main", as originally suggested.
If that fails, ask here again, but please give some more useful
information first.

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