Subject: Re: Yet another undefined _WinMain16...
From: "Cliff Hones" <[email-masked]>
To: <[email-masked]>, <[email-masked]>
Date: Thu, 19 Jun 2003 23:35:58 +0100

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