This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
RE: My own problem with gcj
- To: "'Joshua R. Poulson'" <jrp@pun.org>, "'java-discuss@sourceware.cygnus.com'" <java-discuss@sourceware.cygnus.com>
- Subject: RE: My own problem with gcj
- From: Drury Tim <Tim_Drury@bscc.bls.com>
- Date: Wed, 16 Jun 1999 17:45:46 -0400
Do you have the latest version of binutils? I mean
the bleeding edge snapshot from a day ago or so.
Getting this and recompiling libgcj solved many of
my linker (ld) problems.
-tim
> -----Original Message-----
> From: java-discuss-owner@sourceware.cygnus.com
> [mailto:java-discuss-owner@sourceware.cygnus.com]On Behalf Of
> Joshua R.
> Poulson
> Sent: Wednesday, June 16, 1999 5:38 PM
> To: java-discuss@sourceware.cygnus.com
> Subject: My own problem with gcj
>
>
> Mine's worse. I have your code:
>
> public class Example {
> public static void
> main(String[] args)
> {
> System.out.println("Hello World");
> }
>
> }
>
> And I can compile a class file, and even a .o file, but for
> for an executable
> and I get this:
>
> $ gcj Example.java
> /u/jrp/SunOS/lib/gcc-lib/sparc-sun-solaris2.6/gcc-2.95/crt1.o:
> In function
> `nope':
> /u/jrp/SunOS/lib/gcc-lib/sparc-sun-solaris2.6/gcc-2.95/crt1.o(
> .text+0x5c):
> undefined reference to `main'
> collect2: ld returned 1 exit status
>
> $ gcj -c Example.java
> $ gcj Example.o
> /u/jrp/SunOS/lib/gcc-lib/sparc-sun-solaris2.6/gcc-2.95/crt1.o:
> In function
> `nope':
> /u/jrp/SunOS/lib/gcc-lib/sparc-sun-solaris2.6/gcc-2.95/crt1.o(
> .text+0x5c):
> undefined reference to `main'
>
> This probably is a FAQ, but I haven't found the answer.
>
> --jrp
>
>