Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , 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 Subject: Re: gcj problem... In-Reply-To: <4030CFE0@webmaila.hku.hk> References: <4030CFE0 AT webmaila DOT hku DOT hk> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed 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 for more. In general, familiarize yourself with the information at 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/