compile error

Andrew Haley aph@redhat.com
Wed Nov 6 10:05:00 GMT 2002


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.


More information about the Java mailing list

AltStyle によって変換されたページ (->オリジナル) /