delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/09/13/16:51:35

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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
Date: Mon, 13 Sep 2004 16:51:27 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: "Buchbinder, Barry (NIH/NIAID)" <BBuchbinder AT niaid DOT nih DOT gov>
cc: cygwin AT cygwin DOT com, "'Kostadin Cholakov'" <pirinlion AT yahoo DOT com>
Subject: RE: Undifined reference to _WinMain AT 16 (Attn: FAQ maintainer)
In-Reply-To: <F76C9B2DA2FC4C4CA0A18E288BBCBCF708217D54@nihexchange24.nih.gov>
Message-ID: <Pine.GSO.4.61.0409131645340.661@slinky.cs.nyu.edu>
References: <F76C9B2DA2FC4C4CA0A18E288BBCBCF708217D54 AT nihexchange24 DOT nih DOT gov>
MIME-Version: 1.0
X-Scanned-By: MIMEDefang 2.39

On Mon, 13 Sep 2004, Buchbinder, Barry (NIH/NIAID) wrote:

> > -----Original Message-----
> > From: Kostadin Cholakov
> > Sent: Monday, September 13, 2004 4:25 PM
> > To: cygwin AT XXXXXX DOT XXX

<http://cygwin.com/acronyms/#PCYMTNQREAIYR>.

> > Subject: Undifined reference to _WinMain AT 16
> >
> > Hi
> >
> > I am using for a first time GCJ compiler (and I find
> > it strange) but it seems to work properly. I have my
> > first error message :). It is Undifined reference to
> > _WinMain AT 16. I checked the FAQ but the explanation
> > there doesn't help. In fact, it refers to GCC compiler
> > and the example is an Object C file. Anyway, I tried
> > by putting the -lm flag and it didn't work. I read all
> > stuff provided by man to see if there are some special
> > flags which I should put but I think there was nothing
> > which could help me. So, please, can somebody tell me
> > 2 simple commands in order to compile and then to run
> > a Java program using GCJ! Should I make some
> > additional changes in path or something else? Thanks!
>
> http://sources.redhat.com/cygwin/faq/faq.html#SEC91

This won't work with gcj.  You need to pass a "--main" flag, e.g.,

gcj --main=Hello Hello.java

Would it be possible to add this to the above FAQ entry?
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"Happiness lies in being privileged to work hard for long hours in doing
whatever you think is worth doing."  -- Dr. Jubal Harshaw

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