| View previous topic :: View next topic |
| Author |
Message |
HelloWorld n00b

Joined: 15 Feb 2006 Posts: 62
|
Posted: Wed May 31, 2006 5:45 pm Post subject: GCJ spinnt. |
|
|
Hallo,
Ich versuche gerade, ein kleines Hello World-Programm in Java mit dem GCJ zu kompilieren. Mit dem javac funktioniert das auch aber mit dem gcj kommt folgende Fehlermeldung:
user@localhost ~/Java $ gcj HelloWorld.java
/usr/lib/gcc/i686-pc-linux-gnu/3.4.5/../../../crt1.o: In function `_start':
init.c: (.text+0x18): undefined reference to `main'
collect2: ld returned 1 exit status
gcj -c HelloWorld.java funktioniert übrigens, der Fehler passiert also gar nicht beim eigentlichen kompilieren sondern erst beim Linken... Aber das hilft mir auch nicht weiter
Quelltext (eigentlich so primitiv wie's nur geht...)
| Code: | public class HelloWorld{
public static void main(String args[]){
System.out.println("Hello, World");
}
} |
|
|
| Back to top |
|
 |
sirro Veteran


Joined: 20 Jul 2003 Posts: 1467 Location: aachen.nrw.de.eu
|
|
| Back to top |
|
 |
HelloWorld n00b

Joined: 15 Feb 2006 Posts: 62
|
Posted: Wed May 31, 2006 7:29 pm Post subject: |
|
|
Danke  |
|
| Back to top |
|
 |
|