This is the mail archive of the java@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: compile error


Martin Aliger writes:
 > -----
 > package org.apache.poi.poifs.dev;
 >  
 > public class POIFSViewer
 > {
 >  
 >     public static void main(final String args[])
 >     {
 >     }
 > }
 > -----
 > 
 > > Please show use *exactly* the commands that you use to compile this
 > > file and the resulting compiler output.
 > > 
 > > Andrew.
 > 
 > Here it is: [I'm more interested in compile into binary but maybe they are related] 
 > 
 > [alik@explorer poic]$ gcj --version
 > gcj (GCC) 3.2
 > Copyright (C) 2002 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.
 > 
 > [alik@explorer poic]$ gcj --main=POIFSViewer POIFSViewer.java 
 > /tmp/cckLFs3o.o: In function `main':
 > /tmp/cckLFs3o.o(.text+0x1d): undefined reference to `POIFSViewer::class$'
 > collect2: ld returned 1 exit status

In your '--main=' you did not include the package name:

 ~ > gcj org/apache/poi/poifs/dev/POIFSViewer.java --main=org.apache.poi.poifs.dev.POIFSViewer
 ~ > ./a.out
 ~ > 

 > [alik@explorer poic]$ gcj -C POIFSViewer.java 
 > [alik@explorer poic]$ gij POIFSViewer

 ~ > gcj -C org/apache/poi/poifs/dev/POIFSViewer.java
 ~ > gij org.apache.poi.poifs.dev.POIFSViewer
 ~ > 

Andrew.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]