This is the mail archive of the
mailing list for the Cygwin project.
Fixed - Re: Yet another undefined _WinMain16...
- From: foomf at attbi dot com
- To: cygwin at cygwin dot com
- Date: Thu, 19 Jun 2003 23:31:24 +0000
- Subject: Fixed - Re: Yet another undefined _WinMain16...
And... found the problem. A stupid unterminated comment in an included
file on a #declare, which was resulting in chunks of my code being missing.
Never trust included files.
I greatly appreciate the help, embarrassing as the problem was: it turns out
that the undeclared WinMain error can also happen if your main() routine is
actually not there, for some reason, even if it looks as if it should be. That
might be a "look for the obvious" clause in the FAQ.
Cliff, many thanks for your help.
> > Actually, I didn't remove the static because I hadn't seen your message
> > Email propagation messes us up.
> > I'm not sure what other info I could give that would be useful, short of
> > 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/
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html