This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
GCJ error compiling classes
- From: tt tt <tt_745 at yahoo dot co dot uk>
- To: java at gcc dot gnu dot org
- Date: Sun, 17 Apr 2005 20:54:21 +0100 (BST)
- Subject: GCJ error compiling classes
Apologies if this is the wrong list but I am
completely stumped on this one!
I have been using javac (from the sun sdk) for a while
now and it compiles my code fine. I have decided to
give gcj a go but am receiving the following error
message when compiling and using extra classes:
TestMySQL.o(.text+0x6e8): In function
`TestMySQL::main(JArray<java::lang::String*>*)':
/home/bob/p1/TestMySQL.java:134: undefined reference
to `Job::class$'
TestMySQL.o(.text+0x6f5):/home/bob/p1/TestMySQL.java:134:
undefined reference to `Job::Job()'
collect2: ld returned 1 exit status
Contents of Class File:
class Job {
public String job_id;
}
Code line which failes in TestMySQL.java:
Job = new Job();
Compile options:
gcj -c -g -O TestMySQL.java <-- this line works fine
gcj --main=TestMySQL -o TestMySQL TestMySQL.o
Both files are in the same directory.
Any ideas? Am I using the correct compile options? I
am running gcc 3.4.3 on gentoo. All compiles and
workds fine with javac
Thanks in advance.
Send instant messages to your online friends http://uk.messenger.yahoo.com