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: undefined reference


Marco Herrn writes:
 > Hi,
 > 
 > On Tue, Jun 22, 2004 at 07:52:55PM -0600, Tom Tromey wrote:
 > > >>>>> "Marco" ==   <marco@mherrn.de> writes:
 > > 
 > > >> $ gcj -I. -I/usr/share/java/log4j-1.2.jar Test.java -o Test.o
 > > 
 > > Marco> /usr/lib/gcc-lib/i486-linux/3.3.4/../../../crt1.o(.text+0x18): In
 > > Marco> function `_start':
 > > Marco>  [ ... ]
 > > 
 > > You're trying to link again here.  Try the above command but add `-c'.
 > 
 > Yes, that works.
 > 
 > But how to go on? I am sorry for my stupid questions, but I am not used
 > to write C or C++ programs and this behaviour is _very_ C-ish ;-)
 > 
 > So when I call 
 > 
 >    gcj -c /usr/share/java/log4j-1.2.jar -o log4j-1.2.o
 > 
 > I get the following error:
 > 
 > ----/----
 > org/apache/log4j/AppenderSkeleton.java: In class `org.apache.log4j.AppenderSkeleton':
 > org/apache/log4j/AppenderSkeleton.java: In method `org.apache.log4j.AppenderSkeleton.finalize()':
 > org/apache/log4j/AppenderSkeleton.java:115: error: class `org.apache.log4j.AppenderSkeleton' has no method named 'close' matching signature '()V'
 > org/apache/log4j/AppenderSkeleton.java:126: confused by earlier errors, bailing out
 > ----/----
 > 
 > So what is the problem here?

Well, _does_ org.apache.log4j.AppenderSkeleton have a method close() ?
If not, that's a bug in log4j, because AppenderSkeleton.finalize() is
calling it.  

gcj detects this bug at compile time, a Java VM would detect it at
runtime.

Andrew.


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