This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: Undifined reference to _WinMain@16 (Attn: FAQ maintainer)

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@XXXXXX.XXX


> > Subject: Undifined reference to _WinMain@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@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!

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

gcj --main=Hello

Would it be possible to add this to the above FAQ entry?
      |\      _,,,---,,_
ZZZzz /,`.-'`'    -.  ;-;;,_
     |,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:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]