title: How can I compile files separately with gcj?
body: <p>I use gcj (Cygwin version) to compile 2 java files</p>
  
  <p>$ gcj --version
  gcj (GCC) 3.4.4 (cygming special, gdc 0.12, using dmd 0.125)
  Copyright (C) 2004 Free Software Foundation, Inc.
  This is free software; see the source for copying conditions.  There is NO
  warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.</p>
  
  <p>Here's my 2 java files:</p>
  
  <p>$ cat MyClass.java  </p>
  
  <pre><code>public class MyClass {  
     public MyClass() {  
        System.out.println("Hello, MyClass");  
     }  
  } 
  </code></pre>
  
  <p>$ cat HelloWorld.java  </p>
  
  <pre><code>public class HelloWorld {  
     public static void main(String[] args) {  
        MyClass myclass = new MyClass();  
        System.out.println("Hello, World");  
     }   
  }
  </code></pre>
  
  <p>I'm able to execute the code in HelloWorld with</p>
  
  <pre><code>$ gcj.exe -o hello --main=HelloWorld --classpath=. HelloWorld.java MyClass.java
  </code></pre>
  
  <p>I would like to compile them separatly like</p>
  
  <pre><code>gcj.exe -C MyClass.java
  </code></pre>
  
  <p>then  </p>
  
  <pre><code>gcj.exe  --main=HelloWorld --classpath=. HelloWorld.java
  </code></pre>
  
  <p>The problem is that I get </p>
  
  <pre><code>/tmp/ccKwa7F4.o: In function '_ZN10HelloWorld4mainEP6JArrayIPN4java4lang6StringEE':  
  /home/lucm/HelloWorld.java:3: undefined reference to `MyClass::class$'  
  /home/lucm/HelloWorld.java:3: undefined reference to `MyClass::MyClass()'  
  collect2: ld returned 1 exit status
  </code></pre>