Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Date: Mon, 13 Sep 2004 22:50:02 +0200
From: "Gerrit P. Haase" <gp@familiehaase.de>
Reply-To: "Gerrit @ cygwin" <cygwin@cygwin.com>
Organization: Esse keine toten Tiere
Message-ID: <1179084154.20040913225002@familiehaase.de>
To: Kostadin Cholakov <pirinlion@yahoo.com>
CC: cygwin@cygwin.com
Subject: Re: Undifined reference to _WinMain@16
In-Reply-To: <20040913202508.38797.qmail@web41908.mail.yahoo.com>
References: <20040913202508.38797.qmail@web41908.mail.yahoo.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes

Hello Kostadin,

Am Montag, 13. September 2004 um 22:25 schriebst du:

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

$ cat hello.java
public class hello {
public static void main(String[] args) {
        System.out.println("Just another Java hacker,");
        }
}
$ gcj --main=hello hello.java -o hello
$ ./hello


-- 
=^..^=



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

