delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2004/02/16/11:05:11

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/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
Message-Id: <6.0.1.1.2.20040216080109.02b31c80@pop.sonic.net>
X-Sender: rschulz AT pop DOT sonic DOT net
Date: Mon, 16 Feb 2004 08:04:44 -0800
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rschulz AT sonic DOT net>
Subject: Re: gcj problem...
In-Reply-To: <4030CFE0@webmaila.hku.hk>
References: <4030CFE0 AT webmaila DOT hku DOT hk>
Mime-Version: 1.0
X-IsSubscribed: yes

Jason,

You need to learn about the ways in which GCJ differs from the stock 
Sun Java Tools. In particular, you need to use the "--main=" option to 
nominate the class that bears the primary entry point. See 
<http://gcc.gnu.org/java/faq.html#4_1> for more.

In general, familiarize yourself with the information at 
<http://gcc.gnu.org/java/> if you want to use GCJ in place of or in 
addition to the Sun tools (or Jikes, for that matter).

Randall Schulz


At 05:20 2004-02-16, Jason Fu wrote:
>Any idea about it...
>
>$ gcj HelloWorld.java
>/usr/lib/gcc-lib/i686-pc-cygwin/3.3.1/../../../libcygwin.a(libcmain.o)(.text+0
>x7
>c): undefined reference to `_WinMain AT 16'
>collect2: ld returned 1 exit status
>
>=====================================================
>public class HelloWorld
>{
>         public static void main(String[] args)
>         {
>                 System.out.println("Hello World!");
>         }
>}
>=====================================================
>
>http://www.hkucs.org:8080/~tsfu/


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