This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Linking problem
- To: java at gcc dot gnu dot org, java-patches at gcc dot gnu dot org
- Subject: Re: Linking problem
- From: Alexandre Petit-Bianco <apbianco at cygnus dot com>
- Date: Tue, 28 Aug 2001 19:45:31 -0700 (PDT)
- References: <15243.51258.607260.992719@fencer.cygnus.com><47980000.999016831@warlock.codesourcery.com><15243.52148.959646.404236@fencer.cygnus.com><87itf78urw.church.of.emacs@space-ghost.verbum.private>
- Reply-To: apbianco at cygnus dot com
Colin Walters writes:
> Maybe it could just be added to the FAQ for now? I was having the
> same problem.
So, how about this?
./A
2001-08-28 Alexandre Petit-Bianco <apbianco@redhat.com
Colin Walters <walters@verbum.org>
* faq.html (4.1.a): New entry.
Index: faq.html
===================================================================
RCS file: /cvs/gcc/wwwdocs/htdocs/java/faq.html,v
retrieving revision 1.43
diff -u -p -r1.43 faq.html
--- faq.html 2001/07/11 18:43:38 1.43
+++ faq.html 2001/08/29 02:44:23
@@ -49,6 +49,7 @@
<ol>
<li><a href="#4_1">Why do I get <tt>undefined reference to `main'</tt>
errors?</a>
+ <li><a href="#4_1_a">Why do I get "undefined reference to a symbol ending in `class$'?</a>
<li><a href="#4_2">Can GCJ only handle source code? </a>
<li><a href="#4_3">"gcj -C" Doesnt seem to work like javac/jikes.
Whats going on? </a>
@@ -482,6 +483,22 @@ $ ../configure [...]
option to indicate the class that has the desired <tt>main</tt> method.
This is because every Java class can have a <tt>main</tt> method, thus
you have to tell gcj which one to use.</dd>
+ <dt> </dt>
+ <hr>
+ </dl>
+ <dl>
+ <dt>
+ <h3><a name="4_1_a">4.1.a Why do I get "undefined reference to a symbol ending in `class$'?</a></h3>
+ </dt>
+ </dl>
+ <p>
+ <dl>
+ <dd>This problem is usually caused by passing an incorrect
+ class name to the <tt>--main</tt> argument. The class name needs
+ to be fully qualified with the package name, and names
+ should be separated by `<tt>.</tt>'. Note that this is a
+ <A HREF="http://gcc.gnu.org/ml/java-prs/2001-q1/msg00072.html">
+ known</A> problem.
<dt> </dt>
<hr>
</dl>