This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: Link problem with gcj
- To: bd.vrijkorte@signaal.nl
- Subject: Re: Link problem with gcj
- From: Andrew Haley <aph@pasanda.cygnus.co.uk>
- Date: 20 Aug 1999 13:51:37 -0000
- CC: java-discuss@sourceware.cygnus.com
> Date: Fri, 20 Aug 1999 15:46:40 +0200
> From: "b.d. vrijkorte" <bd.vrijkorte@signaal.nl>
>
> Hello,
>
> when I compile a 'Hello world' java-program using gcj I get an ld error
> (see below).
> I have installed:
> - gcc 2.95.1
> - binutils 2.9.1.0.25
> - libstdc++-2.90.6
> - libgcj-2.95
>
> A 'Hello world' program using gcc compiles and works correctly.
>
> Who can tell me what's wrong?
Unlike C, which can only have one function called main(), every Java
class can have a method main(), so You have to tell gcj which class to
start. What you need is
gcj test.java --main=test
Andrew.